application\admin\controller\Addons.php,在452行看到:
- public function sql_split($sql, $tablepre) {
- if ($tablepre != "twothink_")
- $sql = str_replace ( "twothink_", $tablepre, $sql );
- $sql = preg_replace ( "/TYPE=(InnoDB|MyISAM|MEMORY)( DEFAULT CHARSET=[^; ]+)?/", "ENGINE=\\1 DEFAULT CHARSET=utf8", $sql );
- if ($r_tablepre != $s_tablepre)//这是两个无用的变量
- $sql = str_replace ( $s_tablepre, $r_tablepre, $sql );
- $sql = str_replace ( "\r", "\n", $sql );
- $ret = array ();
- $num = 0;
复制代码
我查了一下,这个错误来自onethink的源码。注释掉这两行即可:
- // if ($r_tablepre != $s_tablepre)
- // $sql = str_replace ( $s_tablepre, $r_tablepre, $sql );
复制代码
原作者:Loyal to the skies,越洋 |