bug 556105
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-05-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* read_dump.php3, bug 556105: do not execute a bookmark if asked to
|
||||||
|
only view it
|
||||||
|
|
||||||
2002-05-19 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-05-19 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* lang/german.inc.php3:
|
* lang/german.inc.php3:
|
||||||
- Updated serveral untranslated strings.
|
- Updated serveral untranslated strings.
|
||||||
|
@@ -327,35 +327,38 @@ if ($sql_query != '') {
|
|||||||
$sql_query_cpy = implode(";\n", $pieces) . ';';
|
$sql_query_cpy = implode(";\n", $pieces) . ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only one query to run
|
// really run the query?
|
||||||
if ($pieces_count == 1 && !empty($pieces[0]) && $view_bookmark == 0) {
|
if ($view_bookmark == 0) {
|
||||||
// sql.php3 will stripslash the query if get_magic_quotes_gpc
|
// Only one query to run
|
||||||
if (get_magic_quotes_gpc() == 1) {
|
if ($pieces_count == 1 && !empty($pieces[0])) {
|
||||||
$sql_query = addslashes($pieces[0]);
|
// sql.php3 will stripslash the query if get_magic_quotes_gpc
|
||||||
} else {
|
if (get_magic_quotes_gpc() == 1) {
|
||||||
$sql_query = $pieces[0];
|
$sql_query = addslashes($pieces[0]);
|
||||||
}
|
} else {
|
||||||
if (eregi('^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $sql_query)) {
|
$sql_query = $pieces[0];
|
||||||
$reload = 1;
|
|
||||||
}
|
|
||||||
include('./sql.php3');
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Runs multiple queries
|
|
||||||
else if (mysql_select_db($db)) {
|
|
||||||
for ($i = 0; $i < $pieces_count; $i++) {
|
|
||||||
$a_sql_query = $pieces[$i];
|
|
||||||
$result = mysql_query($a_sql_query);
|
|
||||||
if ($result == FALSE) { // readdump failed
|
|
||||||
$my_die = $a_sql_query;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
|
if (eregi('^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $sql_query)) {
|
||||||
$reload = 1;
|
$reload = 1;
|
||||||
}
|
}
|
||||||
} // end for
|
include('./sql.php3');
|
||||||
} // end else if
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs multiple queries
|
||||||
|
else if (mysql_select_db($db)) {
|
||||||
|
for ($i = 0; $i < $pieces_count; $i++) {
|
||||||
|
$a_sql_query = $pieces[$i];
|
||||||
|
$result = mysql_query($a_sql_query);
|
||||||
|
if ($result == FALSE) { // readdump failed
|
||||||
|
$my_die = $a_sql_query;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
|
||||||
|
$reload = 1;
|
||||||
|
}
|
||||||
|
} // end for
|
||||||
|
} // end else if
|
||||||
|
} // end if (really run the query)
|
||||||
unset($pieces);
|
unset($pieces);
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user