1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

fixed backquotes breaking create query

This commit is contained in:
secretr
2008-08-15 13:15:11 +00:00
parent 90aa3d6927
commit 77c2731c6c

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
| $Revision: 1.44 $ | $Revision: 1.45 $
| $Date: 2008-08-13 20:46:59 $ | $Date: 2008-08-15 13:15:11 $
| $Author: e107steved $ | $Author: secretr $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -795,7 +795,7 @@ class e107plugin
switch($function) switch($function)
{ {
case 'install' : case 'install' :
$sqlTable = preg_replace("/create table\s+/si", "CREATE TABLE ".MPREFIX, $ct[0]); $sqlTable = str_replace("CREATE TABLE ".MPREFIX.'`', "CREATE TABLE `".MPREFIX, preg_replace("/create table\s+/si", "CREATE TABLE ".MPREFIX, $ct[0]));
$txt .= "Adding table: {$ct[1]} ... "; $txt .= "Adding table: {$ct[1]} ... ";
$result = $this->manage_tables('add', array($sqlTable)); // Pass the statement to create the table $result = $this->manage_tables('add', array($sqlTable)); // Pass the statement to create the table
$txt .= ($result ? "Success" : "Failed!").'<br />'; $txt .= ($result ? "Success" : "Failed!").'<br />';