wip: Mobile-Theme-Testphase und PHP-8.2-Guards (Stand Juni 2026)

This commit is contained in:
Thomas Bartelt
2026-09-13 19:10:56 +02:00
parent 08beac8d67
commit 20d55f77b8
1448 changed files with 16015 additions and 583 deletions
+15
View File
@@ -58,6 +58,15 @@ class layout extends Smarty {
header('content-type: text/html; charset=utf-8');
$this->__construct();
// Smarty 4.5+ verlangt explizite Plugin-Registrierung für PHP-Funktionen als Modifier.
// Legacy-Templates nutzen u.a. |stristr — hier zentral registrieren statt überall ersetzen.
foreach (['stristr', 'strstr', 'str_replace', 'preg_replace', 'urlencode', 'urldecode', 'trim'] as $fn) {
if (function_exists($fn)) {
$this->registerPlugin('modifier', $fn, $fn);
}
}
$this->compile_id = SHOP_SYSTEM.'_'.$base_object->config->shopConfiguration['THEME'];
$this->compile_dir = ROOT_DIR.'/tmp/smarty_compile';
$this->cache_dir = ROOT_DIR.'/tmp/smarty_cache';
@@ -65,6 +74,12 @@ class layout extends Smarty {
$tpl_paths = array();
$tpl_paths[] = ROOT_DIR.'/web/'.SHOP_SYSTEM.'/themes/'.$base_object->config->shopConfiguration['THEME'].'/templates';
// Mobile-Theme: theme2 als Fallback vor dem Parent — Mobile überschreibt nur
// die Schlüssel-Templates, alles andere kommt aus theme2 bzw. easyshop_advanced.
if ($base_object->config->shopConfiguration['THEME'] === 'mobile') {
$tpl_paths[] = ROOT_DIR.'/web/'.SHOP_SYSTEM.'/themes/theme2/templates';
}
if ($theme->parent_theme) {
$tpl_paths[] = ROOT_DIR.'/themes/'.$theme->parent_theme.'/templates';
}