aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-04-13 13:18:42 +0000
committerpatdenice <patdenice@piwigo.org>2011-04-13 13:18:42 +0000
commit9345eca5daf56dd83808692f053467092e945449 (patch)
tree8dcdf566f4e2aed68bf78f024a594fc2659e8506 /admin
parent15a759c4cafb8ed8526c33f445df6302ec79cfd0 (diff)
merge r10354 from trunk to branch 2.2
feature:2264 new trigger to add prefilter on batch manager git-svn-id: http://piwigo.org/svn/branches/2.2@10355 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/batch_manager.php8
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl3
2 files changed, 6 insertions, 5 deletions
diff --git a/admin/batch_manager.php b/admin/batch_manager.php
index 232c84f08..20446e5d4 100644
--- a/admin/batch_manager.php
+++ b/admin/batch_manager.php
@@ -55,11 +55,7 @@ if (isset($_POST['submitFilter']))
if (isset($_POST['filter_prefilter_use']))
{
- $prefilters = array('caddie', 'last import', 'with no album', 'with no tag', 'with no virtual album', 'duplicates', 'all photos');
- if (in_array($_POST['filter_prefilter'], $prefilters))
- {
- $_SESSION['bulk_manager_filter']['prefilter'] = $_POST['filter_prefilter'];
- }
+ $_SESSION['bulk_manager_filter']['prefilter'] = $_POST['filter_prefilter'];
}
if (isset($_POST['filter_category_use']))
@@ -253,6 +249,8 @@ SELECT id
array_from_query($query, 'id')
);
}
+
+ $filter_sets = trigger_event('bulk_manager_prefilter', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
}
if (isset($_SESSION['bulk_manager_filter']['category']))
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 28b84869c..5c54eec1b 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -339,6 +339,9 @@ jQuery(window).load(function() {
<option value="with no tag" {if $filter.prefilter eq 'with no tag'}selected="selected"{/if}>{'with no tag'|@translate}</option>
<option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>{'duplicates'|@translate}</option>
<option value="all photos" {if $filter.prefilter eq 'all photos'}selected="selected"{/if}>{'All'|@translate}</option>
+ {foreach from=$bulk_manager_plugins_prefilters item=plugin_prefilter}
+ <option value="{$plugin_prefilter.ID}" {if $filter.prefilter eq $plugin_prefilter.ID}selected="selected"{/if}>{$plugin_prefilter.NAME}</option>
+ {/foreach}
</select>
</li>
<li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>