From 12e3ba49d478d719d784b61da533c7c367a543ef Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 06 Dec 2008 11:36:11 -0500
Subject: [PATCH] Added support for internal repliaction for ispconfig multiserver setups.
---
server/lib/app.inc.php | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php
index e0e9e74..7cf9a49 100644
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -40,6 +40,24 @@
if($conf["start_db"] == true) {
$this->load('db_'.$conf["db_type"]);
$this->db = new db;
+
+ /*
+ Initialize the connection to the master DB,
+ if we are in a multiserver setup
+ */
+
+ if($conf["dbmaster_host"] != '' && $conf["dbmaster_host"] != $conf["db_host"]) {
+ $this->dbmaster = new db;
+ if($this->dbmaster->linkId) $this->dbmaster->closeConn();
+ $this->dbmaster->dbHost = $conf["dbmaster_host"];
+ $this->dbmaster->dbName = $conf["dbmaster_database"];
+ $this->dbmaster->dbUser = $conf["dbmaster_user"];
+ $this->dbmaster->dbPass = $conf["dbmaster_password"];
+ } else {
+ $this->dbmaster = $this->db;
+ }
+
+
}
}
--
Gitblit v1.9.1