From df08cfaa60bfc5afcf86e882624ef3a9f438fa6c Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Tue, 4 Oct 2022 14:43:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A8=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0=D0=BD=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/Component.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/Component.php b/src/Controller/Component.php index a528190..209d765 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -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)