From 0afaeeef55b8476025d45409c7a78d21fce0f3e9 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Wed, 17 Sep 2014 17:21:26 +0000 Subject: featur 3130: change batch_manager_register_filters to trigger_change git-svn-id: http://piwigo.org/svn/trunk@29598 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'admin/batch_manager.php') diff --git a/admin/batch_manager.php b/admin/batch_manager.php index 05590e29c..905035fac 100644 --- a/admin/batch_manager.php +++ b/admin/batch_manager.php @@ -161,7 +161,7 @@ if (isset($_POST['submitFilter'])) $_SESSION['bulk_manager_filter']['search']['q'] = $_POST['q']; } - trigger_notify('batch_manager_register_filters'); + $_SESSION['bulk_manager_filter'] = trigger_change('batch_manager_register_filters', $_SESSION['bulk_manager_filter']); } // filters from url elseif (isset($_GET['filter'])) @@ -233,8 +233,7 @@ elseif (isset($_GET['filter'])) break; default: - $_SESSION['bulk_manager_filter'] = trigger_change('batch_manager_url_filter', - $_SESSION['bulk_manager_filter'], $type, $value); + $_SESSION['bulk_manager_filter'] = trigger_change('batch_manager_url_filter', $_SESSION['bulk_manager_filter'], $filter); break; } } @@ -391,9 +390,11 @@ SELECT id $filter_sets[] = query2array($query, null, 'id'); } break; - } - $filter_sets = trigger_change('perform_batch_manager_prefilters', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']); + default: + $filter_sets = trigger_change('perform_batch_manager_prefilters', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']); + break; + } } if (isset($_SESSION['bulk_manager_filter']['category'])) @@ -513,7 +514,7 @@ if (isset($_SESSION['bulk_manager_filter']['search'])) $filter_sets[] = $res['items']; } -$filter_sets = trigger_change('batch_manager_perform_filters', $filter_sets); +$filter_sets = trigger_change('batch_manager_perform_filters', $filter_sets, $_SESSION['bulk_manager_filter']); $current_set = array_shift($filter_sets); foreach ($filter_sets as $set) -- cgit v1.2.3