Remove v prefix from version display, fix router default_page

This commit is contained in:
2026-07-28 15:18:17 +02:00
parent 74487d4820
commit 8b454cd038
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -56,7 +56,7 @@
<tr><td class="text-muted">Site titel</td><td><?= htmlspecialchars($siteConfig['site_title'] ?? 'CodePress') ?></td></tr>
<tr><td class="text-muted">Standaard taal</td><td><?= htmlspecialchars($siteConfig['language']['default'] ?? 'nl') ?></td></tr>
<tr><td class="text-muted">Auteur</td><td><?= htmlspecialchars($siteConfig['author']['name'] ?? '-') ?></td></tr>
<tr><td class="text-muted">CodePress versie</td><td>v<?= htmlspecialchars($stats['cms_version']) ?></td></tr>
<tr><td class="text-muted">CodePress versie</td><td><?= htmlspecialchars($stats['cms_version']) ?></td></tr>
<tr><td class="text-muted">PHP versie</td><td><?= $stats['php_version'] ?></td></tr>
<tr><td class="text-muted">Besturingssysteem</td><td><?= htmlspecialchars($stats['os']) ?></td></tr>
<tr><td class="text-muted">Config geladen</td><td><?= $stats['config_exists'] ? '<span class="badge bg-success">Ja</span>' : '<span class="badge bg-danger">Nee</span>' ?></td></tr>
+1 -1
View File
@@ -1066,7 +1066,7 @@ class CodePressCMS {
'author_git' => 'https://git.noorlander.info/E.Noorlander',
'seo_description' => $this->config['seo']['description'] ?? 'CodePress CMS - Lightweight file-based content management system',
'seo_keywords' => $this->config['seo']['keywords'] ?? 'cms, php, content management, file-based',
'cms_version' => ($this->config['show_version'] ?? true) && isset($this->config['version_info']) ? 'v' . $this->config['version_info']['version'] : '',
'cms_version' => ($this->config['show_version'] ?? true) && isset($this->config['version_info']) ? $this->config['version_info']['version'] : '',
// Theme colors
'header_color' => $this->config['theme']['header_color'] ?? '#0d6efd',
'header_font_color' => $this->config['theme']['header_font_color'] ?? '#ffffff',
+5 -3
View File
@@ -40,9 +40,11 @@ if (preg_match('#^/admin(?:/(.+))?$#', $path, $m)) {
// Language-prefixed routes: /nl/page/path → index.php?lang=nl&page=page/path
if (preg_match('#^/(nl|en)(?:/(.+))?$#', $path, $m)) {
$_GET['lang'] = $m[1];
$_GET['page'] = $m[2] ?? 'index';
if ($_GET['page'] === 'guide') {
$_GET['guide'] = '1';
if (isset($m[2]) && $m[2] !== '') {
$_GET['page'] = $m[2];
if ($_GET['page'] === 'guide') {
$_GET['guide'] = '1';
}
}
require $publicDir . '/index.php';
return true;