Prevent inactive profiles in album watermark rules

This commit is contained in:
Terranom674
2026-08-15 14:44:56 +02:00
parent 48133ccb86
commit f3cea2cb32

View File

@@ -38,9 +38,10 @@ function bratonien_tools_save_album_rule()
if ($mode === 'profile') 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 else