mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user