fix При установке модуля неправильно записывались настройки
This commit is contained in:
parent
ab13ebd289
commit
36b7d93a98
2 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue