From 36b7d93a981e009e634c65db18bf7fa862c38073 Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Thu, 15 Dec 2022 18:16:58 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=D0=9F=D1=80=D0=B8=20=D1=83=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B5=20=D0=BC=D0=BE=D0=B4=D1=83?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BD=D0=B5=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D0=BE=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D1=81=D1=8C=20=D0=BD=D0=B0=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=B9=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/Action.php | 2 +- src/Controller/Installer.php | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Controller/Action.php b/src/Controller/Action.php index 4309caf..ee955f5 100644 --- a/src/Controller/Action.php +++ b/src/Controller/Action.php @@ -82,7 +82,7 @@ class Action public function installPath($name) { - $basePath = $this->config->get('site', 'path'); + $basePath = $this->config->get('system', 'path'); return Path::join($basePath, "modules", $name); } diff --git a/src/Controller/Installer.php b/src/Controller/Installer.php index e544921..2adff19 100644 --- a/src/Controller/Installer.php +++ b/src/Controller/Installer.php @@ -94,20 +94,20 @@ class Installer $sql = $settings->get('sql'); if (is_array($sql)) { $res = $this->installSQL($sql, $version_new, $version_old, $name); - if($res){ + if ($res) { $result[]=$res; } } - - // Обновление версии меню - $registry->removeKey($name); - - $registry->set($name, $settings->get('settings')); - $registry->set($name, - array('version' => $version_new, - 'time' => filemtime($setup))); } + // Обновление версии меню + $registry->removeKey($name); + $registry->set($name, [ + 'version' => $version_new, + 'time' => filemtime($setup) + ]); + $registry->writeKey([$name], $settings->get('settings')); + $registry->write(); } return $result;