Complete watermark administration tool registry

This commit is contained in:
Terranom674
2026-08-15 14:39:32 +02:00
parent f8568c2947
commit af08d0f5cd

View File

@@ -9,13 +9,46 @@ require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark.inc.php');
require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark_profiles.inc.php');
require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark_settings.inc.php');
require_once(BRATONIEN_TOOLS_PATH . 'tools/album_rules.inc.php');
require_once(BRATONIEN_TOOLS_PATH . 'include/watermark_engine.inc.php');
function bratonien_tools_get_tools()
{
return array(
'image_cache_clear' => array('title'=>'Bildcache leeren','description'=>'Loescht erzeugte Bildderivate.','button'=>'Bildcache leeren','confirm'=>'Bildcache wirklich leeren?','handler'=>'bratonien_tools_clear_image_cache'),
'watermark' => array('title'=>'Wasserzeichen verwalten','description'=>'Verwaltet Profile, globale Regeln und Albumregeln.','button'=>'Wasserzeichen speichern','confirm'=>'Wasserzeichen speichern?','handler'=>'bratonien_tools_save_watermark'),
'watermark_rule' => array('title'=>'Albumregel','description'=>'Speichert eine Albumregel.','button'=>'Albumregel speichern','confirm'=>'Albumregel speichern?','handler'=>'bratonien_tools_save_album_rule'),
'watermark_defaults' => array('title'=>'Globale Wasserzeichenregeln','description'=>'Definiert Standardprofile für öffentliche und private Alben.','button'=>'Standards speichern','confirm'=>'Standards speichern?','handler'=>'bratonien_tools_save_watermark_defaults'),
'image_cache_clear' => array(
'handler' => 'bratonien_tools_clear_image_cache',
),
'watermark_save' => array(
'handler' => 'bratonien_tools_save_watermark',
),
'watermark_engine' => array(
'handler' => 'bratonien_tools_handle_watermark_engine',
),
'watermark_profile_save' => array(
'handler' => 'bratonien_tools_save_watermark_profile',
),
'watermark_profile_delete' => array(
'handler' => 'bratonien_tools_delete_watermark_profile',
),
'watermark_profile_duplicate' => array(
'handler' => 'bratonien_tools_duplicate_watermark_profile',
),
'watermark_defaults' => array(
'handler' => 'bratonien_tools_save_watermark_defaults',
),
'watermark_rule' => array(
'handler' => 'bratonien_tools_save_album_rule',
),
);
}
function bratonien_tools_handle_watermark_engine()
{
$enabled = !empty($_POST['engine_enabled']);
bratonien_tools_set_watermark_engine($enabled);
return array(
'message' => $enabled
? 'Bratonien-Wasserzeichenverwaltung aktiviert. Piwigos bisherige Wasserzeichen-Nutzung wurde gesichert und unterdrueckt.'
: 'Bratonien-Wasserzeichenverwaltung deaktiviert. Die zuvor gesicherte Piwigo-Wasserzeichen-Nutzung wurde wiederhergestellt.',
);
}