index fa4482e6b3b97ad794f8abde63e86ee546fb8179..8b283bd258180b038296687b55c3b355cbe0d5e5 100644 (file)
$entry['changes'] = $changes;
$entry['result'] = $result;
- if(!isset($this->config->current['LOGGING']) && empty($entry['user'])){
+ if(!isset($config) || ( $this->config->get_cfg_value("logging") == "" && empty($entry['user']))){
$entry['user'] = "unknown";
}
}else{
- if(!isset($this->config->current['LOGGING'])){
- $this->log_into_syslog($entry);
- }else{
-
- /* Start logging for configured methods */
- if(isset($this->config->current['LOGGING']) && preg_match("/(^|,)syslog(,|$)/i",$this->config->current['LOGGING'])){
+ if (isset ($config)){
+ if ($this->config->get_cfg_value("logging") == ""){
$this->log_into_syslog($entry);
- }
- if(isset($this->config->current['LOGGING']) && preg_match("/(^|,)mysql(,|$)/i",$this->config->current['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);
+ }
}
}
}