From a7cb2b0250c17405cd52649be7aa5ed463e7078d Mon Sep 17 00:00:00 2001
From: nveid <nveid@ispconfig3>
Date: Sat, 17 Dec 2011 20:52:35 +0000
Subject: [PATCH] Reversed the logic one place in the mysql client plugin

---
 server/plugins-available/mysql_clientdb_plugin.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php
index 16ff81b166..5bcfbee5a4 100644
--- a/server/plugins-available/mysql_clientdb_plugin.inc.php
+++ b/server/plugins-available/mysql_clientdb_plugin.inc.php
@@ -131,7 +131,7 @@ class mysql_clientdb_plugin {
 		
 			//* Connect to the database
 			$link = new mysqli($clientdb_host, $clientdb_user, $clientdb_password);
-			if (!$link->connect_error) {
+			if ($link->connect_error) {
 				$app->log('Unable to connect to mysql'.$link->connect_error,LOGLEVEL_ERROR);
 				return;
 			}
@@ -184,7 +184,7 @@ class mysql_clientdb_plugin {
 			
 			//* Connect to the database
 			$link = new mysqli($clientdb_host, $clientdb_user, $clientdb_password);
-			if (!$link) {
+			if ($link->connect_error) {
 				$app->log('Unable to connect to the database: '.$link->connect_error,LOGLEVEL_ERROR);
 				return;
 			}
-- 
GitLab