1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 14:50:48 +03:00

Обновление инсталлятора

This commit is contained in:
Mzhelskiy Maxim 2017-02-06 12:39:28 +07:00
parent b8ecf9983d
commit 639ff56789
2 changed files with 27 additions and 2 deletions

View file

@ -4,7 +4,8 @@ class InstallStepUpdateVersion extends InstallStep
{
protected $aVersionConvert = array(
'1.0.3'
'2.0.0',
'1.0.3',
);
public function init()
@ -59,6 +60,30 @@ class InstallStepUpdateVersion extends InstallStep
return call_user_func_array(array($this, $sMethod), array($oDb));
}
/**
* Конвертор версии 2.0.0 в 2.0.1
*
* @param $oDb
*
* @return bool
*/
public function convertFrom_2_0_0_to_2_0_1($oDb)
{
/**
* Запускаем SQL патч
*/
$sFile = 'sql' . DIRECTORY_SEPARATOR . 'patch_2.0.0_to_2.0.1.sql';
list($bResult, $aErrors) = array_values($this->importDumpDB($oDb, InstallCore::getDataFilePath($sFile), array(
'engine' => InstallConfig::get('db.tables.engine'),
'prefix' => InstallConfig::get('db.table.prefix'),
'skip_fk_errors' => true
)));
if ($bResult) {
return true;
}
return $this->addError(join('<br/>', $aErrors));
}
/**
* Конвертор версии 1.0.3 в 2.0.0

View file

@ -1,7 +1,7 @@
<?php
define('INSTALL_DIR', dirname(__FILE__));
define('VERSION', '2.0.0');
define('VERSION', '2.0.1');
function install_func_underscore($sStr)
{