diff --git a/module/install/model.php b/module/install/model.php index f23e82b155..d1272efb48 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -410,8 +410,7 @@ class installModel extends model $tableToLower = strtolower($table); if(strpos($tableToLower, 'fulltext') !== false and strpos($tableToLower, 'innodb') !== false and $version < 5.6) { - $this->lang->install->errorCreateTable = $this->lang->install->errorEngineInnodb; - return false; + $table = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $table); } $table = str_replace('__DELIMITER__', ';', $table); diff --git a/module/upgrade/control.php b/module/upgrade/control.php index 952c5f78f5..8bf4626259 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -111,11 +111,13 @@ class upgrade extends control public function confirm() { if(strpos($this->post->fromVersion, 'lite') !== false) $this->post->fromVersion = $this->config->upgrade->liteVersion[$this->post->fromVersion]; + $confirmSql = $this->upgrade->getConfirm($this->post->fromVersion); + $confirmSql = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $confirmSql); $this->session->set('step', ''); $this->view->title = $this->lang->upgrade->confirm; $this->view->position[] = $this->lang->upgrade->common; - $this->view->confirm = $this->upgrade->getConfirm($this->post->fromVersion); + $this->view->confirm = $confirmSql; $this->view->fromVersion = $this->post->fromVersion; /* When sql is empty then skip it. */ if(empty($this->view->confirm)) $this->locate(inlink('execute', "fromVersion={$this->post->fromVersion}")); @@ -865,6 +867,7 @@ class upgrade extends control { set_time_limit(0); $alterSQL = $this->upgrade->checkConsistency(); + $alterSQL = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $alterSQL); if(empty($alterSQL)) { if(!$netConnect) $this->locate(inlink('selectVersion')); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 6971a54a83..d4e4f07efd 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -2036,8 +2036,7 @@ class upgradeModel extends model $sqlToLower = strtolower($sql); if(strpos($sqlToLower, 'fulltext') !== false and strpos($sqlToLower, 'innodb') !== false and $mysqlVersion < 5.6) { - static::$errors[] = $this->lang->install->errorEngineInnodb; - return false; + $sql = str_replace('ENGINE=InnoDB', 'ENGINE=MyISAM', $sql); } $sql = str_replace('zt_', $this->config->db->prefix, $sql);