vogelor
2008-12-07 4edde672c8f905a399255b53938e475e8b596ef5
The interface also supports the masterdb (database replication)
1 files modified
20 ■■■■■ changed files
interface/lib/app.inc.php 20 ●●●●● patch | view | raw | blame | history
interface/lib/app.inc.php
@@ -45,9 +45,25 @@
    {
        global $conf;
        $this->_conf = $conf;
        if($this->_conf['start_db'] == true) {
                $this->load('db_'.$this->_conf['db_type']);
        if($this->_conf["start_db"] == true) {
            $this->load('db_'.$this->_conf["db_type"]);
                $this->db = new db;
           /*
            Initialize the connection to the master DB,
            if we are in a multiserver setup
            */
            if($this->_conf["dbmaster_host"] != '' && $this->_conf["dbmaster_host"] != $this->_conf["db_host"]) {
                $this->dbmaster = new db;
                if($this->dbmaster->linkId) $this->dbmaster->closeConn();
                $this->dbmaster->dbHost = $this->_conf["dbmaster_host"];
                $this->dbmaster->dbName = $this->_conf["dbmaster_database"];
                $this->dbmaster->dbUser = $this->_conf["dbmaster_user"];
                $this->dbmaster->dbPass = $this->_conf["dbmaster_password"];
            } else {
                $this->dbmaster = $this->db;
            }
        }
        
        //* Start the session