Work with $display_query only if set (Marc spotted this out).

This commit is contained in:
Michal Čihař
2004-08-17 13:01:14 +00:00
parent 2102df6073
commit be3d8a7e91
2 changed files with 9 additions and 4 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2004-08-17 Michal Čihař <michal@cihar.com>
* sql.php: Work with $display_query only if set (Marc spotted this out).
2004-08-17 Marc Delisle <lem9@users.sourceforge.net> 2004-08-17 Marc Delisle <lem9@users.sourceforge.net>
* tbl_select.php, config.inc.php, libraries/config_import.lib.php, * tbl_select.php, config.inc.php, libraries/config_import.lib.php,
libraries/common.lib.php: move search operators to config file, libraries/common.lib.php: move search operators to config file,

10
sql.php
View File

@@ -319,10 +319,12 @@ else {
} else { } else {
$full_sql_query = $sql_query . $sql_limit_to_append; $full_sql_query = $sql_query . $sql_limit_to_append;
} }
if (preg_match('@((.|\n)*)(([[:space:]](PROCEDURE[[:space:]](.*)|FOR[[:space:]]+UPDATE|LOCK[[:space:]]+IN[[:space:]]+SHARE[[:space:]]+MODE))|;)[[:space:]]*$@i', $display_query, $regs)) { if (isset($display_query)) {
$display_query = $regs[1] . $sql_limit_to_append . $regs[3]; if (preg_match('@((.|\n)*)(([[:space:]](PROCEDURE[[:space:]](.*)|FOR[[:space:]]+UPDATE|LOCK[[:space:]]+IN[[:space:]]+SHARE[[:space:]]+MODE))|;)[[:space:]]*$@i', $display_query, $regs)) {
} else { $display_query = $regs[1] . $sql_limit_to_append . $regs[3];
$display_query = $display_query . $sql_limit_to_append; } else {
$display_query = $display_query . $sql_limit_to_append;
}
} }
unset($sql_limit_to_append); unset($sql_limit_to_append);
} else { } else {