mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
fix install
This commit is contained in:
parent
878445f054
commit
5584a1ef7b
|
@ -226,7 +226,9 @@ abstract class InstallStep
|
||||||
$bResult = mysqli_query($oDb, $sQuery);
|
$bResult = mysqli_query($oDb, $sQuery);
|
||||||
if (!$bResult) {
|
if (!$bResult) {
|
||||||
$sError = mysqli_error($oDb);
|
$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 {
|
} else {
|
||||||
$aErrors[] = mysqli_error($oDb);
|
$aErrors[] = mysqli_error($oDb);
|
||||||
|
|
|
@ -74,9 +74,10 @@ class InstallStepUpdateVersion extends InstallStep
|
||||||
*/
|
*/
|
||||||
$sFile = 'sql' . DIRECTORY_SEPARATOR . 'patch_1.0.3_to_2.0.0.sql';
|
$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(
|
list($bResult, $aErrors) = array_values($this->importDumpDB($oDb, InstallCore::getDataFilePath($sFile), array(
|
||||||
'engine' => InstallConfig::get('db.tables.engine'),
|
'engine' => InstallConfig::get('db.tables.engine'),
|
||||||
'prefix' => InstallConfig::get('db.table.prefix'),
|
'prefix' => InstallConfig::get('db.table.prefix'),
|
||||||
'check_table' => 'cron_task'
|
'check_table' => 'cron_task',
|
||||||
|
'skip_fk_errors' => true
|
||||||
)));
|
)));
|
||||||
if ($bResult) {
|
if ($bResult) {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue