1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Fix for older MySQL dump files.

This commit is contained in:
Cameron
2013-04-17 14:07:45 -07:00
parent bce8760513
commit a25287055a

View File

@@ -1017,11 +1017,14 @@ class e107plugin
foreach ($var as $tab) foreach ($var as $tab)
{ {
$tab = str_replace("TYPE=MyISAM","ENGINE=MyISAM",$tab);
if(!preg_match("/MyISAM.*CHARSET ?= ?utf8/i",$tab)) if(!preg_match("/MyISAM.*CHARSET ?= ?utf8/i",$tab))
{ {
$tab = str_replace("MyISAM", "MyISAM DEFAULT CHARSET=utf8", $tab); $tab = str_replace("MyISAM", "MyISAM DEFAULT CHARSET=utf8", $tab);
} }
$mes->addDebug($tab); $mes->addDebug($tab);
if (false === $sql->db_Query($tab)) if (false === $sql->db_Query($tab))
{ {