From 48133ccb862eef363c467ac166c914cecd949f25 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Sat, 15 Aug 2026 14:44:43 +0200 Subject: [PATCH] Prevent inactive profiles from becoming global defaults --- tools/watermark_settings.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/watermark_settings.inc.php b/tools/watermark_settings.inc.php index 5899443..cfa2948 100644 --- a/tools/watermark_settings.inc.php +++ b/tools/watermark_settings.inc.php @@ -23,9 +23,10 @@ function bratonien_tools_validate_default_profile($value) } $id = (int)$value; - if ($id <= 0 || !bratonien_tools_get_watermark_profile($id)) + $profile = $id > 0 ? bratonien_tools_get_watermark_profile($id) : null; + if (!$profile || empty($profile['active'])) { - throw new RuntimeException('Ungueltiges Wasserzeichenprofil in den globalen Regeln.'); + throw new RuntimeException('Ungueltiges oder inaktives Wasserzeichenprofil in den globalen Regeln.'); } return $id;