fix: apply minor fixes to deprecated config and redundant variable assignment

This commit is contained in:
Marvin Flock
2025-12-22 00:09:50 +01:00
parent 6c1a6aa0de
commit 947a150b06
@@ -100,7 +100,7 @@ function renderTemplate($template, $vars = []): string
); );
// 3. Einzelne Variablen ersetzen // 3. Einzelne Variablen ersetzen
$template = preg_replace_callback( return preg_replace_callback(
'/\{([A-Z0-9_]+)\}/i', '/\{([A-Z0-9_]+)\}/i',
function($m) use ($vars) { function($m) use ($vars) {
$var = $m[1]; $var = $m[1];
@@ -108,8 +108,6 @@ function renderTemplate($template, $vars = []): string
}, },
$template $template
); );
return $template;
} }
function adminUebersicht(): void function adminUebersicht(): void
@@ -6229,8 +6227,8 @@ function adminOrdnungsstrafeMailen(): void
function sendJoomlaMail(): void function sendJoomlaMail(): void
{ {
$db = getDatabase(); $db = getDatabase();
$jInput = Factory::getContainer()->get(SiteApplication::class)->input; $app = Factory::getContainer()->get(SiteApplication::class);
$config = Factory::getConfig(); $jInput = $app->input;
$back = $db->escape(trim($jInput->get('back', '', 'RAW'))); $back = $db->escape(trim($jInput->get('back', '', 'RAW')));
$to = $db->escape(trim($jInput->get('an', '', 'RAW'))); $to = $db->escape(trim($jInput->get('an', '', 'RAW')));
@@ -6240,8 +6238,8 @@ function sendJoomlaMail(): void
$body = nl2br(trim($jInput->get('nachricht', '', 'RAW'))); $body = nl2br(trim($jInput->get('nachricht', '', 'RAW')));
// Joomla From-Adresse aus Konfiguration // Joomla From-Adresse aus Konfiguration
$fromEmail = $config->get('mailfrom');
$fromName = 'STFV'; $fromName = 'STFV';
$fromEmail = $app->getCfg('mailfrom');
// Mailer erstellen über FactoryInterface // Mailer erstellen über FactoryInterface
$mailer = Factory::getContainer() $mailer = Factory::getContainer()