From 57e32a79125072d27ebc76ca26acac64db5cb4fc Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 25 Mar 2024 17:31:53 +0000 Subject: [PATCH] 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 --- 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 8ad36e049..e3fbc1057 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -67,12 +67,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');