index f255bd5ad0af7caa3221e0cc98b2e1812bbecaf1..fbdbb371c72b953e34a4b1dd78325e6fdb5c4c86 100644 (file)
}
$entry = array();
}
$entry = array();
- if(!session::is_set('config')){
+ if(!session::global_is_set('config')){
$entry['user']= "unkown";
}else{
$entry['user']= "unkown";
}else{
- $this->config = session::get('config');
+ $this->config = session::global_get('config');
$ui = get_userinfo();
$entry['user']= @$ui->dn;
}
$ui = get_userinfo();
$entry['user']= @$ui->dn;
}
$entry['changes'] = $changes;
$entry['result'] = $result;
$entry['changes'] = $changes;
$entry['result'] = $result;
- if($this->config->get_cfg_value("logging") == "" && empty($entry['user'])){
+ if(!isset($this->config) || ( $this->config->get_cfg_value("logging") == "" && empty($entry['user']))){
$entry['user'] = "unknown";
}
$entry['user'] = "unknown";
}
}else{
}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 ($this->config)){
+ if ($this->config->get_cfg_value("logging") == ""){
$this->log_into_syslog($entry);
$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);
+ }
}
}
}
}
}
}
/* Connect to the database
*/
/* Connect to the database
*/
+ ini_set("mysql.connect_timeout",5);
$con = @mysql_pconnect($server_name,$server['USER'],$server['PWD']);
if(!$con){
$error = msgPool::dbconnect(_("MySQL logging"),mysql_error());
$con = @mysql_pconnect($server_name,$server['USER'],$server['PWD']);
if(!$con){
$error = msgPool::dbconnect(_("MySQL logging"),mysql_error());