From 9ecd38911e6094e2867d490e2da5f65ecedf0370 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 25 Mar 2024 17:31:53 +0000 Subject: add observer to the permissions query. this should not be necessary but it makes it clear why it should be included in the cache key (cherry picked from commit 57e32a79125072d27ebc76ca26acac64db5cb4fc) --- include/contact_widgets.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 3589653c1..84f688d36 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -68,12 +68,11 @@ function categories_widget($baseurl,$selected = '') { require_once('include/security.php'); - $sql_extra = item_permissions_sql(App::$profile['profile_uid']); + $observer = get_observer_hash(); + $sql_extra = item_permissions_sql(App::$profile['profile_uid'], $observer); $item_normal = item_normal(); - $observer = get_observer_hash(); - $key = __FUNCTION__ . '_' . md5(App::$profile['profile_uid'] . $observer); $content = Cache::get($key, '5 MINUTE'); -- cgit v1.2.3