From 5be33c3f30893cd03ff59cbbb1aa3eefc8ed39b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=BCller?= Date: Tue, 21 Aug 2001 10:44:36 +0000 Subject: [PATCH] some more fixes suggested by loic --- defines.inc.php3 | 5 +---- lib.inc.php3 | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/defines.inc.php3 b/defines.inc.php3 index 8c22ebd03..4d7c09561 100755 --- a/defines.inc.php3 +++ b/defines.inc.php3 @@ -46,10 +46,8 @@ if (!defined('PMA_WINDOWS')) { } } -if (!$nomysql) { // small hack (temporary) - // MySQL Version -if (!defined('MYSQL_MAJOR_VERSION')) { +if (!defined('MYSQL_MAJOR_VERSION') && isset($link)) { if (!empty($server)) { $result = mysql_query('SELECT VERSION() AS version'); if ($result != FALSE && @mysql_num_rows($result) > 0) { @@ -71,5 +69,4 @@ if (!defined('MYSQL_MAJOR_VERSION')) { } // end if } -} ?> diff --git a/lib.inc.php3 b/lib.inc.php3 index 37e85a8f6..9b5dba867 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -95,9 +95,7 @@ if (!defined('__LIB_INC__')){ } // defines wants to connect mysql, and at this place there are no connexion yet... - $nomysql = 1; include('./defines.inc.php3'); - $nomysql = 0; @@ -136,10 +134,10 @@ if (!defined('__LIB_INC__')){ { global $sql_query; - if (empty($error_message)) { + if (!$error_message) { $error_message = mysql_error(); } - if (empty($the_query)) { + if (!$the_query) { $the_query = $GLOBALS['sql_query']; } $hist = (isset($GLOBALS['btnDrop'])) ? -2 : -1;