Marius Cramer
2015-05-19 6f6aa983d80882d10038945c10d7dedf572e0641
server/lib/app.inc.php
@@ -51,7 +51,7 @@
               */
         if($conf['dbmaster_host'] != '' && ($conf['dbmaster_host'] != $conf['db_host'] || ($conf['dbmaster_host'] == $conf['db_host'] && $conf['dbmaster_database'] != $conf['db_database']))) {
            $this->dbmaster = new db($conf['dbmaster_host'], $conf['dbmaster_user'], $conf['dbmaster_password'], $conf['dbmaster_database']);
            $this->dbmaster = new db($conf['dbmaster_host'], $conf['dbmaster_user'], $conf['dbmaster_password'], $conf['dbmaster_database'], $conf['dbmaster_port']);
         } else {
            $this->dbmaster = $this->db;
         }
@@ -151,7 +151,7 @@
         if(isset($this->dbmaster)) {
            $server_id = $conf['server_id'];
            $loglevel = $priority;
            $message = $this->dbmaster->quote($msg);
            $message = $msg;
            $datalog_id = (isset($this->modules->current_datalog_id) && $this->modules->current_datalog_id > 0)?$this->modules->current_datalog_id:0;
            if($datalog_id > 0) {
               $tmp_rec = $this->dbmaster->queryOneRecord("SELECT count(syslog_id) as number FROM sys_log WHERE datalog_id = ? AND loglevel = ?", $datalog_id, LOGLEVEL_ERROR);