1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-07 11:28:21 +03:00

fix install

This commit is contained in:
Mzhelskiy Maxim 2016-10-14 22:27:11 +07:00
parent 878445f054
commit 5584a1ef7b
2 changed files with 7 additions and 4 deletions

View file

@ -226,7 +226,9 @@ abstract class InstallStep
$bResult = mysqli_query($oDb, $sQuery);
if (!$bResult) {
$sError = mysqli_error($oDb);
if (isset($aParams['skip_fk_errors']) and $aParams['skip_fk_errors'] and stripos($sError, '_fk') !== false and stripos($sError, 'DROP') !== false) {
if (isset($aParams['skip_fk_errors']) and $aParams['skip_fk_errors'] and
(mysqli_errno($oDb) == 152 or (stripos($sError, '_fk') !== false and stripos($sError, 'DROP') !== false))
) {
// пропускаем ошибки связанные с внешними ключами
} else {
$aErrors[] = mysqli_error($oDb);

View file

@ -74,9 +74,10 @@ class InstallStepUpdateVersion extends InstallStep
*/
$sFile = 'sql' . DIRECTORY_SEPARATOR . 'patch_1.0.3_to_2.0.0.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'),
'check_table' => 'cron_task'
'engine' => InstallConfig::get('db.tables.engine'),
'prefix' => InstallConfig::get('db.table.prefix'),
'check_table' => 'cron_task',
'skip_fk_errors' => true
)));
if ($bResult) {
/**