diff --git a/ChangeLog b/ChangeLog index 2a7662ed4..be44278e1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-05-22 Garvin Hicking + * sql.php3, libraries/common.lib.php3: Bug #692854: Never execute + a query in (with/without) PHP code views, and display a new + "Execute query" link in this mode. + 2003-05-20 Garvin Hicking * index.php3: New rewrite of how the frameset is created (Patch item #738226 plus some corrections). diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 58dd3c189..bbad4a24e 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -1447,6 +1447,15 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} $php_link .= '1">' . $GLOBALS['strPhp']; } $php_link .= '</a>]'; + + if (isset($GLOBALS['show_as_php']) && $GLOBALS['show_as_php'] == '1') { + $php_link .= '&nbsp;[<a href="sql.php3' + . $url_qpart + . '&amp;show_query=1' + . '&amp;sql_query=' . urlencode($local_query) + . '">' . $GLOBALS['strRunQuery'] . '</a>]'; + } + } else { $php_link = ''; } //show as php diff --git a/sql.php3 b/sql.php3 index 672c13601..f9444e406 100755 --- a/sql.php3 +++ b/sql.php3 @@ -285,7 +285,7 @@ else { // E x e c u t e t h e q u e r y // Only if we didn't ask to see the php code (mikebeck) - if (!empty($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { + if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { unset($result); $num_rows = 0; }