Шаблон по умолчанию

This commit is contained in:
origami11@yandex.ru 2022-10-04 14:43:36 +03:00
parent b60398acd7
commit df08cfaa60

View file

@ -86,7 +86,8 @@ class Controller_Component
}
public function getTemplateName($_registry/*: Settings*/) {
return (isset($_COOKIE['with_template']) && preg_match('/^[\w\d-]{3,20}$/', $_COOKIE['with_template'])) ? $_COOKIE['with_template'] : $_registry->readKey(array('system', 'template'));
return (isset($_COOKIE['with_template']) && preg_match('/^[\w\d-]{3,20}$/', $_COOKIE['with_template']))
? $_COOKIE['with_template'] : ($_registry ? $_registry->readKey(array('system', 'template')) : 'modern');
}
public function getView($name)