From 4931295d78d19c212ce42349afda0b1a360f330e Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 1 Sep 2014 18:45:00 +0000 Subject: feature 3130: new triggers batch_manager_register_filters and batch_manager_perform_filters to simplify adding filters in Batch Manager with a plugin. git-svn-id: http://piwigo.org/svn/trunk@29377 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'admin/batch_manager.php') diff --git a/admin/batch_manager.php b/admin/batch_manager.php index 26f764e0b..602ec07b6 100644 --- a/admin/batch_manager.php +++ b/admin/batch_manager.php @@ -160,6 +160,8 @@ if (isset($_POST['submitFilter'])) { $_SESSION['bulk_manager_filter']['search']['q'] = $_POST['q']; } + + trigger_notify('batch_manager_register_filters'); } // filters from url elseif (isset($_GET['filter'])) @@ -479,6 +481,8 @@ if (isset($_SESSION['bulk_manager_filter']['search'])) $filter_sets[] = $res['items']; } +$filter_sets = trigger_change('batch_manager_perform_filters', $filter_sets); + $current_set = array_shift($filter_sets); foreach ($filter_sets as $set) { -- cgit v1.2.3