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
$template = preg_replace_callback(
return preg_replace_callback(
'/\{([A-Z0-9_]+)\}/i',
function($m) use ($vars) {
$var = $m[1];
@@ -108,8 +108,6 @@ function renderTemplate($template, $vars = []): string
},
$template
);
return $template;
}
function adminUebersicht(): void
@@ -6229,8 +6227,8 @@ function adminOrdnungsstrafeMailen(): void
function sendJoomlaMail(): void
{
$db = getDatabase();
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
$config = Factory::getConfig();
$app = Factory::getContainer()->get(SiteApplication::class);
$jInput = $app->input;
$back = $db->escape(trim($jInput->get('back', '', 'RAW')));
$to = $db->escape(trim($jInput->get('an', '', 'RAW')));
@@ -6240,8 +6238,8 @@ function sendJoomlaMail(): void
$body = nl2br(trim($jInput->get('nachricht', '', 'RAW')));
// Joomla From-Adresse aus Konfiguration
$fromEmail = $config->get('mailfrom');
$fromName = 'STFV';
$fromEmail = $app->getCfg('mailfrom');
// Mailer erstellen über FactoryInterface
$mailer = Factory::getContainer()