fixed some 'not refreshing left frame'
This commit is contained in:
@@ -8,6 +8,7 @@ $Source$
|
|||||||
2006-02-05 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2006-02-05 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* libraries/mult_submits.inc.php, server_databases.php: array to string
|
* libraries/mult_submits.inc.php, server_databases.php: array to string
|
||||||
conversion (sorry to late :-( ), use of $_REQUEST
|
conversion (sorry to late :-( ), use of $_REQUEST
|
||||||
|
* sql.php: fixed some 'not refreshing left frame'
|
||||||
|
|
||||||
2006-02-04 Marc Delisle <lem9@users.sourceforge.net>
|
2006-02-04 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/Config.class.php: bug #1409770 auto-detection and dirname on
|
* libraries/Config.class.php: bug #1409770 auto-detection and dirname on
|
||||||
|
10
sql.php
10
sql.php
@@ -59,7 +59,8 @@ if (!isset($sql_query) && isset($table) && isset($db)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// instead of doing the test twice
|
// instead of doing the test twice
|
||||||
$is_drop_database = preg_match('@DROP[[:space:]]+DATABASE[[:space:]]+@i', $sql_query);
|
$is_drop_database = preg_match('/DROP[[:space:]]+(DATABASE|SCHEMA)[[:space:]]+/i',
|
||||||
|
$sql_query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check rights in case of DROP DATABASE
|
* Check rights in case of DROP DATABASE
|
||||||
@@ -219,14 +220,14 @@ if (!$cfg['Confirm']
|
|||||||
|| isset($GLOBALS['show_as_php'])
|
|| isset($GLOBALS['show_as_php'])
|
||||||
|
|
||||||
|| !empty($GLOBALS['validatequery'])) {
|
|| !empty($GLOBALS['validatequery'])) {
|
||||||
$do_confirm = FALSE;
|
$do_confirm = false;
|
||||||
} else {
|
} else {
|
||||||
$do_confirm = isset($analyzed_sql[0]['queryflags']['need_confirm']);
|
$do_confirm = isset($analyzed_sql[0]['queryflags']['need_confirm']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($do_confirm) {
|
if ($do_confirm) {
|
||||||
$stripped_sql_query = $sql_query;
|
$stripped_sql_query = $sql_query;
|
||||||
require_once('./libraries/header.inc.php');
|
require_once './libraries/header.inc.php';
|
||||||
if ($is_drop_database) {
|
if ($is_drop_database) {
|
||||||
echo '<h1 class="warning">' . $strDropDatabaseStrongWarning . '</h1>';
|
echo '<h1 class="warning">' . $strDropDatabaseStrongWarning . '</h1>';
|
||||||
}
|
}
|
||||||
@@ -269,8 +270,7 @@ else {
|
|||||||
// TODO: use the parser/analyzer
|
// TODO: use the parser/analyzer
|
||||||
|
|
||||||
if (empty($reload)
|
if (empty($reload)
|
||||||
&& (preg_match('@^CREATE (VIEW|TABLE)\s+@i', $sql_query)
|
&& preg_match('/^(CREATE|ALTER|DROP)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $sql_query)) {
|
||||||
|| preg_match('@^ALTER TABLE\s+.*RENAME@i', $sql_query))) {
|
|
||||||
$reload = 1;
|
$reload = 1;
|
||||||
}
|
}
|
||||||
// Gets the number of rows per page
|
// Gets the number of rows per page
|
||||||
|
Reference in New Issue
Block a user