Bug #692854: Never execute a query in (with/without) PHP code views, and display a

new      "Execute query" link in this mode.
This commit is contained in:
Garvin Hicking
2003-05-22 09:28:00 +00:00
parent 7fc46ed02a
commit b65746a2f1
3 changed files with 15 additions and 1 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-05-22 Garvin Hicking <me@supergarv.de>
* 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 <me@supergarv.de>
* index.php3: New rewrite of how the frameset is created
(Patch item #738226 plus some <noframes> corrections).

View File

@@ -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

View File

@@ -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;
}