* finish task #1794.
This commit is contained in:
@@ -370,6 +370,10 @@ class installModel extends model
|
||||
{
|
||||
$table = str_replace('--', '', $table);
|
||||
}
|
||||
|
||||
/* Skip sql that is note. */
|
||||
if(preg_match('/^--|^#|^\/\*/', $table)) continue;
|
||||
|
||||
$table = str_replace('`zt_', $this->config->db->name . '.`zt_', $table);
|
||||
$table = str_replace('zt_', $this->config->db->prefix, $table);
|
||||
if(!$this->dbh->query($table)) return false;
|
||||
|
||||
@@ -158,6 +158,7 @@ class upgradeModel extends model
|
||||
case '5_0':
|
||||
case '5_1':
|
||||
case '5_2':
|
||||
case '5_2_1': $confirmContent .= file_get_contents($this->getUpgradeFile('5.2.1'));
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
@@ -612,13 +613,14 @@ class upgradeModel extends model
|
||||
{
|
||||
$line = trim($line);
|
||||
$sqls[$key] = $line;
|
||||
if(strpos($line, '--') !== false or empty($line)) unset($sqls[$key]);
|
||||
|
||||
/* Skip sql that is note. */
|
||||
if(preg_match('/^--|^#|^\/\*/', $line) or empty($line)) unset($sqls[$key]);
|
||||
}
|
||||
$sqls = explode(';', join("\n", $sqls));
|
||||
|
||||
foreach($sqls as $sql)
|
||||
{
|
||||
$sql = trim($sql);
|
||||
if(empty($sql)) continue;
|
||||
|
||||
if($mysqlVersion <= 4.1)
|
||||
|
||||
Reference in New Issue
Block a user