From 01995c21826f3ad87bf1f40d842a17b30be068c7 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Sun, 16 Aug 2026 12:54:13 +0200 Subject: [PATCH] Prepare selected user groups for public selection settings --- admin.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin.php b/admin.php index 35a7b91..3e708c9 100644 --- a/admin.php +++ b/admin.php @@ -47,6 +47,12 @@ $engine = bratonien_tools_get_watermark_engine_config(); $cache_workers = bratonien_tools_get_cache_worker_settings(); $public_selection = bratonien_tools_get_public_selection_settings(); $public_selection_groups = bratonien_tools_get_piwigo_groups(); +$selected_public_selection_groups = array_fill_keys($public_selection['groups'], true); +foreach ($public_selection_groups as &$group) +{ + $group['selected'] = isset($selected_public_selection_groups[(int)$group['id']]); +} +unset($group); $watermark_options = array(); $watermark_meta = array();