From a4ab6188836b9fec93bfb527f04582fdf55ecfa6 Mon Sep 17 00:00:00 2001 From: ucorina Date: Tue, 27 Sep 2011 10:04:32 +0000 Subject: [PATCH] Fix for mysql_get_server_info() - database connect failed. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9372 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DB.class.php | 2 +- classes/db/DBMysql.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index c3272843c..4c6022c34 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -739,7 +739,7 @@ && $db_info->master_db["db_password"] == $db_info->slave_db[0]["db_password"] && $db_info->master_db["db_database"] == $db_info->slave_db[0]["db_database"] ) - $this->slave_db = &$this->master_db; + $this->slave_db[0] = &$this->master_db; else $this->slave_db = $db_info->slave_db; $this->prefix = $db_info->master_db["db_table_prefix"]; diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index e6b965714..c054b6fed 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -69,7 +69,7 @@ return; } // Error appears if the version is lower than 4.1 - if(mysql_get_server_info()<"4.1") { + if(mysql_get_server_info($result)<"4.1") { $this->setError(-1, "XE cannot be installed under the version of mysql 4.1. Current mysql version is ".mysql_get_server_info()); return; } @@ -79,7 +79,7 @@ $this->setError(mysql_errno(), mysql_error()); return; } - + return $result; }