Skip to content

Commit

Permalink
Work with $display_query only if set (Marc spotted this out).
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Aug 17, 2004
1 parent 2102df6 commit be3d8a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$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>
* tbl_select.php, config.inc.php, libraries/config_import.lib.php,
libraries/common.lib.php: move search operators to config file,
Expand Down
10 changes: 6 additions & 4 deletions sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,12 @@
} 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 {
Expand Down

0 comments on commit be3d8a7

Please sign in to comment.