1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +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

@@ -1016,12 +1016,15 @@ class e107plugin
case 'add': case 'add':
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))
{ {