mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
invalidation of the users cache done in a function and an action is triggered
git-svn-id: http://piwigo.org/svn/trunk@1978 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -154,7 +154,6 @@ if (count($page['infos']) != 0)
|
||||
}
|
||||
|
||||
$template->parse('admin');
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | order permission refreshment |
|
||||
@@ -179,11 +178,8 @@ if (
|
||||
)
|
||||
)
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.USER_CACHE_TABLE.'
|
||||
SET need_update = \'true\'
|
||||
;';
|
||||
pwg_query($query);
|
||||
invalidate_user_cache();
|
||||
}
|
||||
|
||||
include(PHPWG_ROOT_PATH.'include/page_tail.php');
|
||||
?>
|
||||
|
||||
@@ -2013,4 +2013,16 @@ function pwg_URL()
|
||||
return $urls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates cahed data (permissions and category counts) for all users.
|
||||
*/
|
||||
function invalidate_user_cache()
|
||||
{
|
||||
$query = '
|
||||
UPDATE '.USER_CACHE_TABLE.'
|
||||
SET need_update = \'true\'
|
||||
;';
|
||||
pwg_query($query);
|
||||
trigger_action('invalidate_user_cache');
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user