summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2a0d69)
raw | patch | inline | side by side (parent: f2a0d69)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Nov 2007 12:48:48 +0000 (12:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Nov 2007 12:48:48 +0000 (12:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7889 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/logview/class_gosa_logview.inc | patch | blob | history |
diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc
index 847800380854101df599512807472634e8a73190..786f8326b6bc7a27bb21dc4a5501654cc24cdfdd 100644 (file)
var $timezone_offset = 0;
+ var $uid_map = array();
+
+
function gosa_logview (&$config, $dn= NULL)
{
/* Include config object */
/* Restore last filter settings */
foreach(array("action","server","time","regex") as $attr){
if(isset($_SESSION['logview']['gosa_log'][$attr])){
- $this->$attr = $_SESSION['logview']['gosa_log'][$attr];
+ $this->$attr = $_SESSION['logview']['gosa_log'][$attr];
}
}
$tz = get_default_timezone();
$this->timezone_offset = $tz['value'] * 60 * 60 ;
+
+ $ldap = $this->config->get_ldap_link();
+ $ldap->search("(&(objectClass=person)(uid=*))",array("uid","dn"));
+ while($attrs = $ldap->fetch()){
+ $this->uid_map[$attrs['dn']] = $attrs['uid'][0];
+ }
}
}
$base = ", ".substr($this->config->current['BASE'],0,5)."...";
- $user = preg_replace("/,".normalizePreg($this->config->current['BASE'])."/",$base,$line['user']);
+
+ if(isset($this->uid_map[$line['user']])){
+ $user = $this->uid_map[$line['user']];
+ }else{
+ $user = preg_replace("/,".normalizePreg($this->config->current['BASE'])."/",$base,$line['user']);
+ }
$object = preg_replace("/,".normalizePreg($this->config->current['BASE'])."/",$base,$line['object']);
$res.=" <tr style=\"$col\">\n";