aboutsummaryrefslogtreecommitdiffstats
path: root/admin/batch_manager.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-07-25 13:28:16 +0000
committerplegall <plg@piwigo.org>2014-07-25 13:28:16 +0000
commitcacdce647409ce7559dd63e94830648786126859 (patch)
tree09a048f642e555dca290a1e69905f80064d825d6 /admin/batch_manager.php
parentb97fcf2a2203a28ccba854215bf58d2129bd4c5b (diff)
feature 2904: add a link "empty caddie" in the Batch Manager.
git-svn-id: http://piwigo.org/svn/trunk@29076 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/batch_manager.php21
1 files changed, 21 insertions, 0 deletions
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 |