From 2b42273a98f83a40dca03aac53376b3bd0d41abe Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 16 Nov 2022 13:54:18 +0100 Subject: [PATCH] add warning about the use of forbidden_categories user cache variable --- admin/albums.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/albums.php b/admin/albums.php index 94890bdf0..c8a7f5a87 100644 --- a/admin/albums.php +++ b/admin/albums.php @@ -183,6 +183,11 @@ foreach ($allAlbum as $album) $the_place['cat'] = $album; } +// WARNING $user['forbidden_categories'] is 100% reliable only on gallery side because +// it's a cache variable. On administration side, if you modify public/private status +// of an album or change permissions, this variable is reset and not recalculated until +// you open the gallery. As this situation doesn't occur each time you use the +// administration, it's quite reliable but not as much as on gallery side. $is_forbidden = array_fill_keys(@explode(',', $user['forbidden_categories']), 1); //Make an ordered tree