diff options
author | mistic100 <mistic@piwigo.org> | 2014-09-17 17:21:26 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-09-17 17:21:26 +0000 |
commit | 0afaeeef55b8476025d45409c7a78d21fce0f3e9 (patch) | |
tree | f33086de7b3f53d5c9301002ed35aa41c640eb85 | |
parent | 7478a32fe0c11c2496985dab53d2d099bc18d93f (diff) |
featur 3130: change batch_manager_register_filters to trigger_change
git-svn-id: http://piwigo.org/svn/trunk@29598 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/batch_manager.php | 13 | ||||
-rw-r--r-- | tools/triggers_list.php | 22 |
2 files changed, 18 insertions, 17 deletions
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) diff --git a/tools/triggers_list.php b/tools/triggers_list.php index d30057d0b..fda170950 100644 --- a/tools/triggers_list.php +++ b/tools/triggers_list.php @@ -9,18 +9,25 @@ array( array( 'name' => 'batch_manager_perform_filters', 'type' => 'trigger_change', - 'vars' => array('array', 'filter_sets'), + 'vars' => array('array', 'filter_sets', 'array', 'bulk_manager_filter'), 'files' => array('admin\batch_manager.php'), 'infos' => 'New in 2.7', ), array( 'name' => 'batch_manager_register_filters', - 'type' => 'trigger_notify', - 'vars' => array(), + 'type' => 'trigger_change', + 'vars' => array('array', 'bulk_manager_filter'), 'files' => array('admin\batch_manager.php'), 'infos' => 'New in 2.7', ), array( + 'name' => 'batch_manager_url_filter', + 'type' => 'trigger_change', + 'vars' => array('array', 'bulk_manager_filter', 'string', 'filter'), + 'files' => array('admin\batch_manager.php'), + 'infos' => 'New in 2.7.', +), +array( 'name' => 'begin_delete_elements', 'type' => 'trigger_notify', 'vars' => array('array', 'ids'), @@ -641,7 +648,7 @@ array( array( 'name' => 'perform_batch_manager_prefilters', 'type' => 'trigger_change', - 'vars' => array('array', 'filter_sets', 'string', 'session_prefilter'), + 'vars' => array('array', 'filter_sets', 'string', 'prefilter'), 'files' => array('admin\batch_manager.php'), ), array( @@ -897,13 +904,6 @@ array( 'files' => array('include\ws_functions\pwg.users.php'), 'infos' => 'New in 2.6.2.', ), -array( - 'name' => 'batch_manager_url_filter', - 'type' => 'trigger_change', - 'vars' => array('array', 'bulk_manager_filter', 'string', 'type', 'string', 'value'), - 'files' => array('admin\batch_manager.php'), - 'infos' => 'New in 2.7.', -), ); ?> <!DOCTYPE html> |