diff --git a/application/install/backend/step.php b/application/install/backend/step.php index 64e8a927..41ec4b65 100644 --- a/application/install/backend/step.php +++ b/application/install/backend/step.php @@ -279,8 +279,7 @@ abstract class InstallStep if ($rResult = mysqli_query($this->rDbLink, $sQuery)) { return $rResult; } - $aErrors[] = mysqli_error($this->rDbLink); - return false; + return $this->addError(mysqli_error($this->rDbLink)); } protected function dbSelect($sQuery) @@ -310,6 +309,8 @@ abstract class InstallStep foreach ($aFields as $sFields => $sValue) { if (is_int($sValue)) { $aPath[] = "`{$sFields}` = " . $sValue; + } elseif (is_null($sValue)) { + $aPath[] = "`{$sFields}` = 'NULL'"; } else { $aPath[] = "`{$sFields}` = '" . mysqli_escape_string($this->rDbLink, $sValue) . "'"; } diff --git a/application/install/backend/step/updateVersion.php b/application/install/backend/step/updateVersion.php index 4b34452d..ebcac016 100644 --- a/application/install/backend/step/updateVersion.php +++ b/application/install/backend/step/updateVersion.php @@ -69,7 +69,6 @@ class InstallStepUpdateVersion extends InstallStep */ public function convertFrom_2_0_0_to_2_0_1($oDb) { - /** * Запускаем SQL патч */ @@ -137,10 +136,6 @@ class InstallStepUpdateVersion extends InstallStep return $this->addError(join('
', $aErrors)); } } - /** - * Дата публикации - */ - $this->dbQuery("UPDATE prefix_topic SET topic_date_publish = topic_date_add"); /** * Конвертируем опросы * Сначала проверяем необходимость конвертации опросов @@ -751,7 +746,7 @@ class InstallStepUpdateVersion extends InstallStep } - if ($this->getErrors()) { + if ($aErrors = $this->getErrors()) { return $this->addError(join('
', $aErrors)); } return true;