From f0e8db0af80c0624292f38914ed9669e4e6a9e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Thu, 10 May 2001 17:12:25 +0000 Subject: [PATCH] fixed all the special characters problems (Bug #421889) --- db_readdump.php3 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/db_readdump.php3 b/db_readdump.php3 index 7fa7cd54b..0324e88fa 100755 --- a/db_readdump.php3 +++ b/db_readdump.php3 @@ -19,15 +19,14 @@ if(!empty($sql_bookmark)) if(!empty($sql_file) && $sql_file != "none" && ereg("^php[0-9A-Za-z_.-]+$", basename($sql_file))) { $sql_query = fread(fopen($sql_file, "r"), filesize($sql_file)); } +else if (get_magic_quotes_gpc()) { + $sql_query = stripslashes($sql_query); +} $pieces = split_string($sql_query, ";"); if (count($pieces) == 1 && !empty($pieces[0]) && empty($view_bookmark)) { - if(!get_magic_quotes_gpc()) { - $sql_query = addslashes(trim($pieces[0])); - } else { - $sql_query = trim($pieces[0]); - } + $sql_query = addslashes(trim($pieces[0])); // Enforce reloading of the left frame when a table has to be created if (eregi('^CREATE TABLE (.+)', $sql_query)) { $reload = "true"; @@ -41,10 +40,15 @@ for ($i=0; $i