X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_log.inc;h=8b283bd258180b038296687b55c3b355cbe0d5e5;hb=6b427a4efb6d7e4e40ad96ae32a35f61af301d05;hp=f255bd5ad0af7caa3221e0cc98b2e1812bbecaf1;hpb=7bbe835091582eb8d6ea377534573275aa58aaf2;p=gosa.git diff --git a/gosa-core/include/class_log.inc b/gosa-core/include/class_log.inc index f255bd5ad..8b283bd25 100644 --- a/gosa-core/include/class_log.inc +++ b/gosa-core/include/class_log.inc @@ -76,7 +76,7 @@ class log { $entry['changes'] = $changes; $entry['result'] = $result; - if($this->config->get_cfg_value("logging") == "" && empty($entry['user'])){ + if(!isset($config) || ( $this->config->get_cfg_value("logging") == "" && empty($entry['user']))){ $entry['user'] = "unknown"; } @@ -90,16 +90,18 @@ class log { }else{ - if ($this->config->get_cfg_value("logging") == ""){ - $this->log_into_syslog($entry); - }else{ - - /* Start logging for configured methods */ - if(preg_match("/(^|,)syslog(,|$)/i",$this->config->get_cfg_value("logging"))){ + if (isset ($config)){ + if ($this->config->get_cfg_value("logging") == ""){ $this->log_into_syslog($entry); - } - if(preg_match("/(^|,)mysql(,|$)/i",$this->config->get_cfg_value("logging"))){ - $this->log_into_db($entry); + }else{ + + /* Start logging for configured methods */ + if(preg_match("/(^|,)syslog(,|$)/i",$this->config->get_cfg_value("logging"))){ + $this->log_into_syslog($entry); + } + if(preg_match("/(^|,)mysql(,|$)/i",$this->config->get_cfg_value("logging"))){ + $this->log_into_db($entry); + } } } }