From f1926a01df8871cdacb29c97ffbfd7ff18d1610a Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 09 Feb 2016 11:56:40 -0500
Subject: [PATCH] Fixed problems that prevented ISPConfig to run on PHP 7, Issue #3716

---
 server/lib/classes/db_mysql.inc.php |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php
index 52a5e50..e3d0c69 100644
--- a/server/lib/classes/db_mysql.inc.php
+++ b/server/lib/classes/db_mysql.inc.php
@@ -556,19 +556,19 @@
 		global $app;
 		include 'lib/mysql_clientdb.conf';
 		/* Connect to the database */
-		$link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password);
+		$link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password);
 		if (!$link) {
-			$app->log('Unable to connect to the database'.mysql_error($link), LOGLEVEL_DEBUG);
+			$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_DEBUG);
 			return;
 		}
 		/* Get database-size from information_schema */
-		$result=mysql_query("SELECT SUM(data_length+index_length) FROM information_schema.TABLES WHERE table_schema='".mysql_real_escape_string($database_name)."';", $link);
+		$result=mysqli_query("SELECT SUM(data_length+index_length) FROM information_schema.TABLES WHERE table_schema='".mysqli_real_escape_string($database_name)."';", $link);
 		$this->close;
 		if (!$result) {
-			$app->log('Unable to get the database-size'.mysql_error($link), LOGLEVEL_DEBUG);
+			$app->log('Unable to get the database-size'.mysqli_error($link), LOGLEVEL_DEBUG);
 			return;
 		}
-		$database_size = mysql_fetch_row($result);
+		$database_size = mysqli_fetch_row($result);
 		return $database_size[0];
 	}
 

--
Gitblit v1.9.1