From f3cea2cb3209401a4e932c286725c7a956c21b68 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Sat, 15 Aug 2026 14:44:56 +0200 Subject: [PATCH] Prevent inactive profiles in album watermark rules --- tools/album_rules.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/album_rules.inc.php b/tools/album_rules.inc.php index e17a62c..eae4c7b 100644 --- a/tools/album_rules.inc.php +++ b/tools/album_rules.inc.php @@ -38,9 +38,10 @@ function bratonien_tools_save_album_rule() if ($mode === 'profile') { - if ($profile === null || !bratonien_tools_get_watermark_profile($profile)) + $selected = $profile ? bratonien_tools_get_watermark_profile($profile) : null; + if (!$selected || empty($selected['active'])) { - throw new RuntimeException('Bitte ein gueltiges Wasserzeichenprofil auswaehlen.'); + throw new RuntimeException('Bitte ein gueltiges aktives Wasserzeichenprofil auswaehlen.'); } } else