From b31bb1f27f066a2d49f5ab9ee0ca15e985efc788 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 26 Sep 2011 06:50:23 -0400
Subject: [PATCH] Fixed: FS#1619 - Add apache SNI / SAN support for SSL.

---
 interface/lib/classes/db_mysql.inc.php |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index 585de2c..fc7b8b3 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -33,6 +33,8 @@
 	private $dbUser = '';		   // database authorized user
 	private $dbPass = '';		   // user's password
 	private $dbCharset = '';	   // what charset comes and goes to mysql: utf8 / latin1
+	private $dbNewLink = false;    // Return a new linkID when connect is called again
+	private $dbClientFlags = 0;    // MySQL Client falgs
 	private $linkId = 0;		   // last result of mysql_connect()
 	private $queryId = 0;		   // last result of mysql_query()
 	private $record	= array();	   // last record fetched
@@ -51,6 +53,8 @@
 		$this->dbUser = $conf['db_user'];
 		$this->dbPass = $conf['db_password'];
 		$this->dbCharset = $conf['db_charset'];
+		$this->dbNewLink = $conf['db_new_link'];
+		$this->dbClientFlags = $conf['db_client_flags'];
 		//$this->connect();
 	}
 
@@ -69,7 +73,7 @@
 	public function connect()
 	{
 		if($this->linkId == 0){
-			$this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
+			$this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbNewLink, $this->dbClientFlags);
 			if(!$this->linkId){
 				$this->updateError('DB::connect()<br />mysql_connect');
 				return false;
@@ -483,7 +487,7 @@
        
     public function tableInfo($table_name) {
         //* Tabellenfelder einlesen ?
-        if($rows = $this->queryAllRecords('SHOW FIELDS FROM $table_name')){
+        if($rows = $this->queryAllRecords('SHOW FIELDS FROM '.$table_name)){
         foreach($rows as $row) {
             $name    = $row['Field'];
             $default = $row['Default'];

--
Gitblit v1.9.1