some more fixes suggested by loic

This commit is contained in:
Olivier Müller
2001-08-21 10:44:36 +00:00
parent bc9e34e0cd
commit 5be33c3f30
2 changed files with 3 additions and 8 deletions

View File

@@ -46,10 +46,8 @@ if (!defined('PMA_WINDOWS')) {
} }
} }
if (!$nomysql) { // small hack (temporary)
// MySQL Version // MySQL Version
if (!defined('MYSQL_MAJOR_VERSION')) { if (!defined('MYSQL_MAJOR_VERSION') && isset($link)) {
if (!empty($server)) { if (!empty($server)) {
$result = mysql_query('SELECT VERSION() AS version'); $result = mysql_query('SELECT VERSION() AS version');
if ($result != FALSE && @mysql_num_rows($result) > 0) { if ($result != FALSE && @mysql_num_rows($result) > 0) {
@@ -71,5 +69,4 @@ if (!defined('MYSQL_MAJOR_VERSION')) {
} // end if } // end if
} }
}
?> ?>

View File

@@ -95,9 +95,7 @@ if (!defined('__LIB_INC__')){
} }
// defines wants to connect mysql, and at this place there are no connexion yet... // defines wants to connect mysql, and at this place there are no connexion yet...
$nomysql = 1;
include('./defines.inc.php3'); include('./defines.inc.php3');
$nomysql = 0;
@@ -136,10 +134,10 @@ if (!defined('__LIB_INC__')){
{ {
global $sql_query; global $sql_query;
if (empty($error_message)) { if (!$error_message) {
$error_message = mysql_error(); $error_message = mysql_error();
} }
if (empty($the_query)) { if (!$the_query) {
$the_query = $GLOBALS['sql_query']; $the_query = $GLOBALS['sql_query'];
} }
$hist = (isset($GLOBALS['btnDrop'])) ? -2 : -1; $hist = (isset($GLOBALS['btnDrop'])) ? -2 : -1;