Merge branch 'master' of http://gitlab.edu.yar.ru/composer/PHP_Library
This commit is contained in:
commit
7d865fbf46
2 changed files with 10 additions and 8 deletions
|
|
@ -69,6 +69,7 @@ class Controller_Installer
|
|||
{
|
||||
$result = array();
|
||||
$setup = $this->getSetupFile($name);
|
||||
|
||||
if (file_exists($setup) && ($this->isChanged($name) || $force)) {
|
||||
$registry = $this->_registry;
|
||||
$settings = new Settings($setup);
|
||||
|
|
@ -91,20 +92,21 @@ class Controller_Installer
|
|||
$result[]=$res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Обновление версии меню
|
||||
$registry->removeKey($name);
|
||||
$registry->writeKey(array($name), $settings->get('settings'));
|
||||
$registry->writeKey(array($name),
|
||||
// Обновление версии меню
|
||||
$registry->removeKey($name);
|
||||
$registry->writeKey(array($name), $settings->get('settings'));
|
||||
$registry->writeKey(array($name),
|
||||
array('version' => $version_new,
|
||||
'time' => filemtime($setup)));
|
||||
}
|
||||
|
||||
$registry->write();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
function install($dbinit_path,$dbfill_path=null){
|
||||
function install($dbinit_path, $dbfill_path = null) {
|
||||
$json_installer = new Database_JsonInstall($this->db_manager);
|
||||
$json_installer->install($dbinit_path,$dbfill_path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ class Database_JsonInstall {
|
|||
if (is_string($dbinit_file)) {
|
||||
$initActions = json_decode($dbinit_file, true);
|
||||
if (!$initActions) {
|
||||
echo "Invalid dbinit.json ".$dbinit_file;
|
||||
echo "Invalid ".$dbinit_path;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
echo "No dbinit.json";
|
||||
echo "No ".$dbinit_path;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue