From 7274dbb153fad585de1727aa809a014a609140a0 Mon Sep 17 00:00:00 2001 From: e107steved Date: Thu, 26 Mar 2009 21:55:37 +0000 Subject: [PATCH] Bugtracker #4695 - handle empty prfix in language table copy --- e107_admin/language.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/e107_admin/language.php b/e107_admin/language.php index 505f348bd..111afdd3a 100644 --- a/e107_admin/language.php +++ b/e107_admin/language.php @@ -9,9 +9,9 @@ * Administration Area - Languages * * $Source: /cvs_backup/e107_0.8/e107_admin/language.php,v $ - * $Revision: 1.14 $ - * $Date: 2008-12-21 12:53:11 $ - * $Author: secretr $ + * $Revision: 1.15 $ + * $Date: 2009-03-26 21:55:37 $ + * $Author: e107steved $ * */ @@ -398,7 +398,8 @@ function copy_table($oldtable, $newtable, $drop = FALSE, $data = FALSE) { $row = $sql->db_Fetch(); $qry = $row[1]; - $qry = str_replace($old, $new, $qry); +// $qry = str_replace($old, $new, $qry); + $qry = preg_replace("#CREATE\sTABLE\s`{0,1}".$old."`{0,1}\s#", "CREATE TABLE `{$new}` ", $qry, 1); // More selective search } $result = mysql_query($qry); if(!$result)