From 298e6feb58fb4ce8e307fca27504d7106601dfbf Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Tue, 29 Aug 2017 10:49:36 +0200 Subject: [PATCH] fix: mysql (without the "i") class returned to its original state this got replaced by all those mysql-to-mysqli find and replace mumbo-jumbo tricks :) --- install/include/database.php | 16 ++++++++-------- install/process.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) mode change 100644 => 100755 install/include/database.php mode change 100644 => 100755 install/process.php diff --git a/install/include/database.php b/install/include/database.php old mode 100644 new mode 100755 index bae5e9e8..4e5d6daf --- a/install/include/database.php +++ b/install/include/database.php @@ -17,14 +17,14 @@ class MYSQLi_DB { return mysqli_query($this->connection, $query); } }; -class mysqli_DB { +class mysql_DB { var $connection; - function mysqli_DB() { - $this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error()); - mysqli_select_db(SQL_DB, $this->connection) or die(mysqli_error()); + function mysql_DB() { + $this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error()); + mysql_select_db(SQL_DB, $this->connection) or die(mysql_error()); } - function mysqli_exec_batch ($p_query, $p_transaction_safe = true) { + function mysql_exec_batch ($p_query, $p_transaction_safe = true) { if ($p_transaction_safe) { $p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;'; }; @@ -32,7 +32,7 @@ class mysqli_DB { foreach ($query_split as $command_line) { $command_line = trim($command_line); if ($command_line != '') { - $query_result = mysqli_query($GLOBALS["link"], $command_line); + $query_result = mysql_query($command_line); if ($query_result == 0) { break; }; @@ -42,7 +42,7 @@ class mysqli_DB { } function query($query) { - return mysqli_query($GLOBALS["link"], $query, $this->connection); + return mysql_query($query, $this->connection); } }; @@ -50,6 +50,6 @@ if(DB_TYPE) { $database = new MYSQLi_DB; } else { - $database = new mysqli_DB; + $database = new mysql_DB; } ?> diff --git a/install/process.php b/install/process.php old mode 100644 new mode 100755 index 54782de1..9e51aa4d --- a/install/process.php +++ b/install/process.php @@ -124,7 +124,7 @@ class Process { if(DB_TYPE) { $result = $database->connection->multi_query($str); } else { - $result = $database->mysqli_exec_batch($str); + $result = $database->mysql_exec_batch($str); } if($result) { header("Location: index.php?s=3");