diff options
author | rvelices <rv-github@modusoptimus.com> | 2013-12-16 20:18:56 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2013-12-16 20:18:56 +0000 |
commit | 29433f1db489462a86eb4c694674fb057c0ea5b2 (patch) | |
tree | eb6467ccd9dd1de696f195b1f00d32fa3306b3df /admin/cat_list.php | |
parent | 5c9b9c43f549357b5c09c402f7e49a6006bb62bc (diff) |
invalidate_user_cache fix in web service method + do not invalidate user cache on every page hit on album list, photo etc ...
git-svn-id: http://piwigo.org/svn/trunk@25975 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/cat_list.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php index e7fc7805c..f728e8f73 100644 --- a/admin/cat_list.php +++ b/admin/cat_list.php @@ -115,22 +115,24 @@ if (isset($_GET['delete']) and is_numeric($_GET['delete'])) delete_categories(array($_GET['delete'])); $_SESSION['page_infos'] = array(l10n('Virtual album deleted')); update_global_rank(); + invalidate_user_cache(); $redirect_url = get_root_url().'admin.php?page=cat_list'; if (isset($_GET['parent_id'])) { $redirect_url.= '&parent_id='.$_GET['parent_id']; - } + } redirect($redirect_url); } // request to add a virtual category -else if (isset($_POST['submitAdd'])) +elseif (isset($_POST['submitAdd'])) { $output_create = create_virtual_category( $_POST['virtual_name'], @$_GET['parent_id'] ); + invalidate_user_cache(); if (isset($output_create['error'])) { $page['errors'][] = $output_create['error']; @@ -141,14 +143,14 @@ else if (isset($_POST['submitAdd'])) } } // save manual category ordering -else if (isset($_POST['submitManualOrder'])) +elseif (isset($_POST['submitManualOrder'])) { asort($_POST['catOrd'], SORT_NUMERIC); save_categories_order(array_keys($_POST['catOrd'])); $page['infos'][] = l10n('Album manual order was saved'); } -else if (isset($_POST['submitAutoOrder'])) +elseif (isset($_POST['submitAutoOrder'])) { $query = ' SELECT id |