summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6da321)
raw | patch | inline | side by side (parent: e6da321)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 May 2007 04:52:39 +0000 (04:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 May 2007 04:52:39 +0000 (04:52 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6493 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_config.inc | patch | blob | history | |
include/class_log.inc | patch | blob | history | |
include/php_setup.inc | patch | blob | history |
index e9b17448b95f22696c644820efc4fe22b78463d1..ca4d376ec23c2d8d3952965ff5620519e3dc2754 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
$attrs= $ldap->fetch();
$this->data['SERVERS']['LOGGING'][$attrs['cn'][0]]=
array(
+ 'DN' => $attrs['dn'],
'USER' => $attrs['goLogDBUser'][0],
'DB' => $attrs['goLogDB'][0],
'PWD' => $attrs['goLogDBPassword'][0]);
diff --git a/include/class_log.inc b/include/class_log.inc
index c2f05639157eacd1ee871a10ea50c1984da2c364..ecc3bf16d9ccb543781218ff039c78a6835e3714 100644 (file)
--- a/include/class_log.inc
+++ b/include/class_log.inc
*/
function log($action,$objecttype,$object,$changes_array = array(),$result = TRUE)
{
- $this->config = $_SESSION['config'];
- $ui = get_userinfo();
+ $entry = array();
+ if(!isset($_SESSION['config'])){
+ $entry['user']= "unkown";
+ }else{
+
+ $this->config = $_SESSION['config'];
+ $ui = get_userinfo();
+ $entry['user']= @$ui->dn;
+ }
/* Create string out of changes */
$changes ="";
$changes = preg_replace("/,$/","",$changes );
/* Create data object */
- $entry = array();
$entry['timestamp'] = time();
- $entry['user'] = @$ui->dn;
$entry['action'] = $action;
$entry['objecttype']= $objecttype;
$entry['object'] = $object;
diff --git a/include/php_setup.inc b/include/php_setup.inc
index 9c2153ed6450ba5a011aa8800b007cca1888b987..ec13459435faafcdfcb6492c3f538883d69db13b 100644 (file)
--- a/include/php_setup.inc
+++ b/include/php_setup.inc
{
global $error_collector,$config;
+ if(@class_exists("log")){
+ new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
+ }
+
/* Return if error reporting is set to zero */
if (error_reporting() == 0){
return;