diff options
author | rvelices <rv-github@modusoptimus.com> | 2013-03-24 06:46:35 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2013-03-24 06:46:35 +0000 |
commit | ea10c19ac5a1f6e89627497e5a6bfdefa37b5053 (patch) | |
tree | 7b59e8ae7a426b524ba8a13a6e2be38bffe6e791 /admin | |
parent | 55275efb66cf6a2b0c874a1d05915fdc83d9cc48 (diff) |
feature 2836: display the number of comments/tags in the menubar
git-svn-id: http://piwigo.org/svn/trunk@21817 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index 4e53d09e6..02917394a 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1367,6 +1367,7 @@ DELETE array_keys($inserts[0]), $inserts ); + invalidate_user_cache_nb_tags(); } /** @@ -1397,6 +1398,8 @@ DELETE WHERE id IN ('.implode(',', $tag_ids).') ;'; pwg_query($query); + + invalidate_user_cache_nb_tags(); } function tag_id_from_tag_name($tag_name) @@ -1486,6 +1489,8 @@ DELETE $inserts ); } + + invalidate_user_cache_nb_tags(); } } @@ -1694,6 +1699,17 @@ UPDATE '.USER_CACHE_TABLE.' trigger_action('invalidate_user_cache', $full); } + +function invalidate_user_cache_nb_tags() +{ + global $user; + unset($user['nb_available_tags']); + $query = ' +UPDATE '.USER_CACHE_TABLE.' + SET nb_available_tags = NULL'; + pwg_query($query); +} + /** * adds the caracter set to a create table sql query. * all CREATE TABLE queries must call this function |