summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 77834e2)
raw | patch | inline | side by side (parent: 77834e2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 May 2007 11:11:39 +0000 (11:11 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 May 2007 11:11:39 +0000 (11:11 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6454 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_log.inc | patch | blob | history |
diff --git a/include/class_log.inc b/include/class_log.inc
index e41beba15e73fdb40f13d53a28ff3cda420d3641..e10b25ad468965d348e9cdf4904a87bbf4d68f63 100644 (file)
--- a/include/class_log.inc
+++ b/include/class_log.inc
*/
function log($action,$objecttype,$object,$changes_array = array(),$result = TRUE)
{
- global $config;
- $this->config = $config;
+ $this->config = $_SESSION['config'];
$ui = get_userinfo();
/* Create string out of changes */
}else{
if(!isset($this->config->current['LOGGING'])){
- @log::log_into_syslog($entry);
+ $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'])){
- @log::log_into_syslog($entry);
+ $this->log_into_syslog($entry);
}
if(isset($this->config->current['LOGGING']) && preg_match("/(^|,)mysql(,|$)/i",$this->config->current['LOGGING'])){
- @log::log_into_db($entry);
+ $this->log_into_db($entry);
}
}
}
/* This function is used to into the systems syslog */
function log_into_syslog($entry)
{
- $str = $entry['user']." ".$entry['action']." ".$entry['object']." from type ".$entry['objecttype']." ".$data." : Result was ".$entry['result'];
+ $str = $entry['user']." ".$entry['action']." ".$entry['object']." from type ".$entry['objecttype']." ".$entry['changes']." : Result was ".$entry['result'];
gosa_log($str);
}
foreach($servers as $server_name => $server){
- $con = mysql_pconnect($server['SERVER'],$server['USER'],$server['PWD']);
+ $con = mysql_pconnect($server_name,$server['USER'],$server['PWD']);
if(!$con){
print_red(sprintf(_("Could not connect to logging server %s."),$server['SERVER']));
}else{