diff --git a/admin/batch_manager.php b/admin/batch_manager.php index 950124ad0..a89ef615b 100644 --- a/admin/batch_manager.php +++ b/admin/batch_manager.php @@ -43,6 +43,27 @@ check_status(ACCESS_ADMINISTRATOR); check_input_parameter('selection', $_POST, true, PATTERN_ID); +// +-----------------------------------------------------------------------+ +// | specific actions | +// +-----------------------------------------------------------------------+ + +if (isset($_GET['action'])) +{ + if ('empty_caddie' == $_GET['action']) + { + $query = ' +DELETE FROM '.CADDIE_TABLE.' + WHERE user_id = '.$user['id'].' +;'; + pwg_query($query); + + $_SESSION['page_infos'] = array( + l10n('Information data registered in database') + ); + + redirect(get_root_url().'admin.php?page='.$_GET['page']); + } +} // +-----------------------------------------------------------------------+ // | initialize current set | diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index 7d693edc6..94adb98be 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -352,6 +352,10 @@ $(document).ready(function() { .slider("values", 0, getSliderKeyFromValue(min, dimension_values[type]) ) .slider("values", 1, getSliderKeyFromValue(max, dimension_values[type]) ); }); + + jQuery("select[name=filter_prefilter]").change(function() { + jQuery("#empty_caddie").toggle(jQuery(this).val() == "caddie"); + }); }); {/footer_script} @@ -376,6 +380,7 @@ $(document).ready(function() { {/foreach} + {'Empty caddie'|translate}
  • diff --git a/language/en_GB/admin.lang.php b/language/en_GB/admin.lang.php index 685a49b3a..b6cce5b86 100644 --- a/language/en_GB/admin.lang.php +++ b/language/en_GB/admin.lang.php @@ -159,4 +159,5 @@ $lang['Impossible to activate this theme, the parent theme is missing: %s'] = 'T $lang['Help Me'] = 'Help me'; $lang['An error occured during extraction (%s).'] = 'An error occurred during the files (%s) extraction.'; $lang['An error has occured during upgrade.'] = 'An error has occurred during upgrade.'; -$lang['An error has occured during extract. Please check files permissions of your piwigo installation.
    Click here to show log error.'] = 'An error has occurred during extract. Please check file permissions of your Piwigo installation.
    Click here to show log error.'; \ No newline at end of file +$lang['An error has occured during extract. Please check files permissions of your piwigo installation.
    Click here to show log error.'] = 'An error has occurred during extract. Please check file permissions of your Piwigo installation.
    Click here to show log error.'; +$lang['Empty caddie'] = 'Empty basket'; \ No newline at end of file diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index 7e849b5d4..ff41b23b4 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -973,4 +973,5 @@ $lang['Users modified'] = 'Users modified'; $lang['close'] = 'close'; $lang['Open user details'] = 'Open user details'; $lang['Close user details'] = 'Close user details'; +$lang['Empty caddie'] = 'Empty caddie'; ?> \ No newline at end of file diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index a1383fe3c..6c5cf6f46 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -976,4 +976,5 @@ $lang['close'] = 'fermer'; $lang['Activate it now'] = 'Activate it now'; $lang['Allow users to add a link to their website'] = 'Autoriser les utilisateurs à donner un lien vers leur site web'; $lang['Impossible to deactivate the default theme.'] = 'Impossible de désactiver le thème par défaut.'; +$lang['Empty caddie'] = 'Vider le panier'; ?> \ No newline at end of file