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:
@@ -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))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user