Поправил установщик для сайтов
This commit is contained in:
parent
a48bce8552
commit
dd08a235c0
2 changed files with 10 additions and 8 deletions
|
|
@ -69,6 +69,7 @@ class Controller_Installer
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
$setup = $this->getSetupFile($name);
|
$setup = $this->getSetupFile($name);
|
||||||
|
|
||||||
if (file_exists($setup) && ($this->isChanged($name) || $force)) {
|
if (file_exists($setup) && ($this->isChanged($name) || $force)) {
|
||||||
$registry = $this->_registry;
|
$registry = $this->_registry;
|
||||||
$settings = new Settings($setup);
|
$settings = new Settings($setup);
|
||||||
|
|
@ -91,7 +92,6 @@ class Controller_Installer
|
||||||
$result[]=$res;
|
$result[]=$res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Обновление версии меню
|
// Обновление версии меню
|
||||||
$registry->removeKey($name);
|
$registry->removeKey($name);
|
||||||
|
|
@ -99,6 +99,8 @@ class Controller_Installer
|
||||||
$registry->writeKey(array($name),
|
$registry->writeKey(array($name),
|
||||||
array('version' => $version_new,
|
array('version' => $version_new,
|
||||||
'time' => filemtime($setup)));
|
'time' => filemtime($setup)));
|
||||||
|
}
|
||||||
|
|
||||||
$registry->write();
|
$registry->write();
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ class Database_JsonInstall {
|
||||||
if (is_string($dbinit_file)) {
|
if (is_string($dbinit_file)) {
|
||||||
$initActions = json_decode($dbinit_file, true);
|
$initActions = json_decode($dbinit_file, true);
|
||||||
if (!$initActions) {
|
if (!$initActions) {
|
||||||
echo "Invalid dbinit.json ".$dbinit_file;
|
echo "Invalid ".$dbinit_path;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "No dbinit.json";
|
echo "No ".$dbinit_path;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue