From 682ed39dc3477064770ab2b536164c77f68b82cf Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Wed, 10 Aug 2011 06:11:27 -0400 Subject: [PATCH] Added destructor to mysql server class. --- server/lib/classes/db_mysql.inc.php | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 2c113b5..7e0c561 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -45,8 +45,7 @@ var $show_error_messages = true; // constructor - function db() - { + public function __construct() { global $conf; $this->dbHost = $conf['db_host']; @@ -56,6 +55,10 @@ $this->dbCharset = $conf['db_charset']; //$this->connect(); } + + public function __destruct() { + $this->closeConn(); + } // error handler function updateError($location) -- Gitblit v1.9.1