From 9315fbdbaca4830263243d74d0f9a33e728bb608 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Tue, 17 May 2016 18:49:34 +0200 Subject: [PATCH] API too is using PDO, including DB_System --- api/panel/bootstrap.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/api/panel/bootstrap.php b/api/panel/bootstrap.php index c135024f..4fe55c98 100644 --- a/api/panel/bootstrap.php +++ b/api/panel/bootstrap.php @@ -25,20 +25,12 @@ require_once($root."class/functions.php"); global $L_MYSQL_HOST,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN,$L_MYSQL_PWD,$db,$dbh; -class DB_system extends DB_Sql { - var $Host,$Database,$User,$Password; - - /** - * Creator - */ - function DB_system() { - global $L_MYSQL_HOST,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN,$L_MYSQL_PWD; - $this->Host = $L_MYSQL_HOST; - $this->Database = $L_MYSQL_DATABASE; - $this->User = $L_MYSQL_LOGIN; - $this->Password = $L_MYSQL_PWD; - } -} +class DB_system extends DB_Sql { + function __construct() { + global $L_MYSQL_HOST,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN,$L_MYSQL_PWD; + parent::__construct($L_MYSQL_DATABASE, $L_MYSQL_HOST, $L_MYSQL_LOGIN, $L_MYSQL_PWD); + } +} // we do both: $db= new DB_system();