only run query if we didn't aks to see the phpcode of sql

This commit is contained in:
Mike Beck
2002-07-12 14:57:31 +00:00
parent 6bf0c44168
commit b4728b63df
2 changed files with 12 additions and 7 deletions

View File

@@ -4,7 +4,8 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-07-12 Mike Beck <mikebeck@users.sourceforge.net>
* sql.php3: only run query if we didn't ask for phpcode of sql
2002-07-12 Marc Delisle <lem9@users.sourceforge.net>
* libraries/select_lang.lib.php3: add -utf-8 choices
* lang/indonesian updates, thanks to Rachim Tamsjadi

View File

@@ -88,6 +88,7 @@ function PMA_sqlFormat($sql_str) {
*/
if (!defined('PMA_CHK_DROP')
&& !$cfg['AllowUserDropDatabase']
&& eregi('DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE[[:space:]]', $sql_query)) {
// Checks if the user is a Superuser
// TODO: set a global variable with this information
@@ -326,7 +327,10 @@ else {
}
// Executes the query
// only if we didn't ask to see the php code (mikebeck)
if (empty($GLOBALS['show_as_php'])){
$result = @PMA_mysql_query($full_sql_query);
}
// Displays an error message if required and stop parsing the script
if (PMA_mysql_error()) {
$error = PMA_mysql_error();