From be3d8a7e917036a471d406d7da7bc551d1fdb79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 17 Aug 2004 13:01:14 +0000 Subject: [PATCH] Work with $display_query only if set (Marc spotted this out). --- ChangeLog | 3 +++ sql.php | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 495b21845..eb0e0a122 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-08-17 Michal Čihař + * sql.php: Work with $display_query only if set (Marc spotted this out). + 2004-08-17 Marc Delisle * tbl_select.php, config.inc.php, libraries/config_import.lib.php, libraries/common.lib.php: move search operators to config file, diff --git a/sql.php b/sql.php index 0e48eb8f8..6bd226bb3 100644 --- a/sql.php +++ b/sql.php @@ -319,10 +319,12 @@ else { } else { $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)) { - $display_query = $regs[1] . $sql_limit_to_append . $regs[3]; - } else { - $display_query = $display_query . $sql_limit_to_append; + if (isset($display_query)) { + if (preg_match('@((.|\n)*)(([[:space:]](PROCEDURE[[:space:]](.*)|FOR[[:space:]]+UPDATE|LOCK[[:space:]]+IN[[:space:]]+SHARE[[:space:]]+MODE))|;)[[:space:]]*$@i', $display_query, $regs)) { + $display_query = $regs[1] . $sql_limit_to_append . $regs[3]; + } else { + $display_query = $display_query . $sql_limit_to_append; + } } unset($sql_limit_to_append); } else {