From b60398acd79ca961900a130518b721a535b78bed Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Mon, 3 Oct 2022 17:26:18 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=D0=9F=D1=83=D1=82=D1=8C=20=D0=BF=D0=BE?= =?UTF-8?q?=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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Controller/Component.php b/src/Controller/Component.php index 1f1e18e..a528190 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -133,6 +133,10 @@ class Controller_Component return $tpl; } + function _getDefaultPath() { + return $this->viewPath[count($this->viewPath) - 1]; + } + public function getTemplatePath($name) { $registry/*: Settings*/ = $this->registry; // Брать настройки из куков если есть @@ -143,12 +147,12 @@ class Controller_Component } } - return Path::join($this->viewPath[0], 'templates', 'modern', $name); + return Path::join($this->viewPath[count($this->viewPath) - 1], 'templates', 'modern', $name); } public function getTemplateWebPath() { - return Path::join($this->webPath[0], 'templates', 'modern'); + return Path::join($this->webPath[count($this->webPath) - 1], 'templates', 'modern'); } /** @@ -181,7 +185,7 @@ class Controller_Component } function getInfo() { - $filename = Path::join($this->viewPath[0], 'install.json'); + $filename = Path::join($this->viewPath[count($this->viewPath) - 1], 'install.json'); if (file_exists($filename)) { $settings = json_decode(File::getContents($filename), true); return $settings;