aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/batch_manager.php13
-rw-r--r--admin/batch_manager_global.php20
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl5
-rw-r--r--language/en_UK/admin.lang.php1
-rw-r--r--language/fr_FR/admin.lang.php1
5 files changed, 32 insertions, 8 deletions
diff --git a/admin/batch_manager.php b/admin/batch_manager.php
index 935445ccc..19dfea311 100644
--- a/admin/batch_manager.php
+++ b/admin/batch_manager.php
@@ -83,6 +83,11 @@ if (isset($_POST['submitFilter']))
if (in_array($_POST['filter_level'], $conf['available_permission_levels']))
{
$_SESSION['bulk_manager_filter']['level'] = $_POST['filter_level'];
+
+ if (isset($_POST['filter_level_include_lower']))
+ {
+ $_SESSION['bulk_manager_filter']['level_include_lower'] = true;
+ }
}
}
}
@@ -289,10 +294,16 @@ if (isset($_SESSION['bulk_manager_filter']['category']))
if (isset($_SESSION['bulk_manager_filter']['level']))
{
+ $operator = '=';
+ if (isset($_SESSION['bulk_manager_filter']['level_include_lower']))
+ {
+ $operator = '<=';
+ }
+
$query = '
SELECT id
FROM '.IMAGES_TABLE.'
- WHERE level >= '.$_SESSION['bulk_manager_filter']['level'].'
+ WHERE level '.$operator.' '.$_SESSION['bulk_manager_filter']['level'].'
;';
array_push(
$filter_sets,
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php
index 6242a2dc9..95cddf520 100644
--- a/admin/batch_manager_global.php
+++ b/admin/batch_manager_global.php
@@ -519,15 +519,25 @@ SELECT
// +-----------------------------------------------------------------------+
// privacy level
+foreach ($conf['available_permission_levels'] as $level)
+{
+ $level_options[$level] = l10n(sprintf('Level %d', $level));
+
+ if (0 == $level)
+ {
+ $level_options[$level] = l10n('Everybody');
+ }
+}
$template->assign(
- array(
- 'filter_level_options'=> get_privacy_level_options(),
- 'filter_level_options_selected' => isset($_SESSION['bulk_manager_filter']['level'])
- ? $_SESSION['bulk_manager_filter']['level']
- : 0,
+ array(
+ 'filter_level_options'=> $level_options,
+ 'filter_level_options_selected' => isset($_SESSION['bulk_manager_filter']['level'])
+ ? $_SESSION['bulk_manager_filter']['level']
+ : 0,
)
);
+// tags
if (!empty($_SESSION['bulk_manager_filter']['tags']))
{
$query = '
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 90182d9a9..7f5d82d1b 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -538,10 +538,11 @@ jQuery(window).load(function() {
<li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
<a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
<input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
- {'Who can see these photos?'|@translate}
+ {'Privacy level'|@translate}
<select name="filter_level" size="1">
{html_options options=$filter_level_options selected=$filter_level_options_selected}
</select>
+ <label><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label>
</li>
</ul>
@@ -552,7 +553,7 @@ jQuery(window).load(function() {
<option value="filter_prefilter">{'Predefined filter'|@translate}</option>
<option value="filter_category">{'Album'|@translate}</option>
<option value="filter_tags">{'Tags'|@translate}</option>
- <option value="filter_level">{'Who can see these photos?'|@translate}</option>
+ <option value="filter_level">{'Privacy level'|@translate}</option>
</select>
<!-- <input id="removeFilters" class="submit" type="submit" value="Remove all filters" name="removeFilters"> -->
<a id="removeFilters" href="">{'Remove all filters'|@translate}</a>
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 1a0de75cd..68eab7860 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -873,4 +873,5 @@ $lang['There is no group in this gallery.'] = 'There is no group in this gallery
$lang['Permission granted for users'] = 'Permission granted for users';
$lang['Select users...'] = 'Select users...';
$lang['%u users have automatic permission because they belong to a granted group.'] = '%u users have automatic permission because they belong to a granted group.';
+$lang['include photos with lower privacy level'] = 'include photos with lower privacy level';
?> \ No newline at end of file
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 5b87ed512..1634d6b3f 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -888,4 +888,5 @@ $lang['There is no group in this gallery.'] = 'Il n\'y a pas de groupe dans cett
$lang['Permission granted for users'] = 'Permission accordée pour les utilisateurs';
$lang['Select users...'] = 'Sélectionnez les utilisateurs...';
$lang['%u users have automatic permission because they belong to a granted group.'] = '%u utilisateurs ont automatiquement la permission car ils appartiennent à un groupe autorisé.';
+$lang['include photos with lower privacy level'] = 'inclure les photos d\'un niveau de confidentialité inférieur';
?> \ No newline at end of file