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;