From 5c9b9c43f549357b5c09c402f7e49a6006bb62bc Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 16 Dec 2013 15:09:49 +0000 Subject: bug 3012 fixed: invalidate_user_cache() on pwg.users.setInfo, pwg.groups.addUser, pwg.groups.deleteUser git-svn-id: http://piwigo.org/svn/trunk@25968 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_functions/pwg.groups.php | 4 ++++ include/ws_functions/pwg.users.php | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include/ws_functions') diff --git a/include/ws_functions/pwg.groups.php b/include/ws_functions/pwg.groups.php index 3401bcaf2..3ae200bec 100644 --- a/include/ws_functions/pwg.groups.php +++ b/include/ws_functions/pwg.groups.php @@ -246,6 +246,8 @@ SELECT COUNT(*) array('ignore'=>true) ); + invalidate_user_cache(); + return $service->invoke('pwg.groups.getList', array('group_id' => $params['group_id'])); } @@ -278,6 +280,8 @@ DELETE FROM '. USER_GROUP_TABLE .' ;'; pwg_query($query); + invalidate_user_cache(); + return $service->invoke('pwg.groups.getList', array('group_id' => $params['group_id'])); } diff --git a/include/ws_functions/pwg.users.php b/include/ws_functions/pwg.users.php index c63284d3e..eb8b14bb0 100644 --- a/include/ws_functions/pwg.users.php +++ b/include/ws_functions/pwg.users.php @@ -335,9 +335,9 @@ function ws_users_delete($params, &$service) } return l10n_dec( - '%d user deleted', '%d users deleted', - count($params['user_id']) - ); + '%d user deleted', '%d users deleted', + count($params['user_id']) + ); } /** @@ -560,6 +560,8 @@ SELECT } } + invalidate_user_cache(); + return $service->invoke('pwg.users.getList', array( 'user_id' => $params['user_id'], 'display' => 'basics,'.implode(',', array_keys($updates_infos)), -- cgit v1.2.3