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