aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php16
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