Compare commits

...

2 Commits

Author SHA1 Message Date
Yasen Pramatarov 3e72568141 Fixes theme helper 2025-06-26 14:48:51 +03:00
Yasen Pramatarov 1993a7e2de Fixes themes footers 2025-06-26 14:48:10 +03:00
3 changed files with 7 additions and 4 deletions

View File

@ -138,11 +138,14 @@ class Theme
// Update session
if (Session::isValidSession()) {
$_SESSION['user_theme'] = $themeName;
$_SESSION['theme'] = $themeName;
} else {
return false;
}
// Clear the current theme cache
self::$currentTheme = null;
// Update config file
$configFile = __DIR__ . '/../config/theme.php';
if (file_exists($configFile) && is_writable($configFile)) {
@ -162,8 +165,8 @@ class Theme
self::$currentTheme = $themeName;
return true;
}
return false;
return true;
}

View File

@ -4,7 +4,7 @@
<div class="row">
<div class="col-md-6">
<span class="text-muted">
&copy; <?= date('Y') ?> <?= htmlspecialchars($config['site_name'] ?? '') ?> v<?= htmlspecialchars($config['version'] ?? '') ?>
&copy; 2024-<?= date('Y') ?> <?= htmlspecialchars($config['site_name'] ?? '') ?> v<?= htmlspecialchars($config['version'] ?? '') ?>
</span>
</div>
<div class="col-md-6 text-md-end">

View File

@ -4,7 +4,7 @@
<div class="row">
<div class="col-md-6">
<span class="text-muted">
&copy; <?= date('Y') ?> <?= htmlspecialchars($config['site_name'] ?? '') ?> v<?= htmlspecialchars($config['version'] ?? '') ?>
&copy; 2024-<?= date('Y') ?> <?= htmlspecialchars($config['site_name'] ?? '') ?> v<?= htmlspecialchars($config['version'] ?? '') ?>
</span>
</div>
<div class="col-md-6 text-md-end">