From 1d8f7f155aadf209eaa4e0ca0805b428b9887b6a Mon Sep 17 00:00:00 2001
From: nveid <nveid@ispconfig3>
Date: Fri, 16 Dec 2011 02:56:46 -0500
Subject: [PATCH] Fixes to allow the serverside to work correctly with mysqli, updating the datalog, and make changes to mysql users in the mysql plugin module.

---
 server/server.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/server.php b/server/server.php
index 5e27cb5..869a621 100644
--- a/server/server.php
+++ b/server/server.php
@@ -40,7 +40,7 @@
 /*
  * Try to Load the server configuration from the master-db
  */
-if ($app->dbmaster->connect()) {
+if ($app->dbmaster->connect_error == NULL) {
 	$server_db_record = $app->dbmaster->queryOneRecord("SELECT * FROM server WHERE server_id = " . $conf['server_id']);
 
 	$conf['last_datalog_id'] = (int) $server_db_record['updated'];
@@ -133,7 +133,7 @@
 /*
  * Next we try to process the datalog
  */
-if ($app->db->connect() && $app->dbmaster->connect()) {
+if ($app->db->connect_error == NULL && $app->dbmaster->connect_error == NULL) {
 
 	// Check if there is anything to update
 	if ($conf['mirror_server_id'] > 0) {
@@ -166,7 +166,7 @@
 		$needStartCore = false;
 	}
 } else {
-	if (!$app->db->connect()) {
+	if ($app->db->connect->connect_error == NULL) {
 		$app->log('Unable to connect to local server.' . $app->db->errorMessage, LOGLEVEL_WARN);
 	} else {
 		$app->log('Unable to connect to master server.' . $app->dbmaster->errorMessage, LOGLEVEL_WARN);

--
Gitblit v1.9.1