From 0a6e4edb849c77f68b4276cc7961367de2ce299d Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 23 Nov 2007 08:38:25 +0000 Subject: [PATCH] Updated logview to display the target object too. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7863 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/logview/class_gosa_logview.inc | 9 +++++++-- plugins/addons/logview/gosa_log_contents.tpl | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc index 9d4a4aab2..3d1f5a5a7 100644 --- a/plugins/addons/logview/class_gosa_logview.inc +++ b/plugins/addons/logview/class_gosa_logview.inc @@ -19,7 +19,7 @@ class gosa_logview extends plugin var $sort = 1; var $sort_direction = "down"; - var $fields = array("action","timestamp","user","result","repeated"); + var $fields = array("action","timestamp","object","user","result","repeated"); var $range = 25; var $view_logged = FALSE; @@ -255,10 +255,15 @@ class gosa_logview extends plugin $col= "background-color: #F5F5F5;"; } + $base = ", ".substr($this->config->current['BASE'],0,5)."..."; + $user = preg_replace("/,".normalizePreg($this->config->current['BASE'])."/",$base,$line['user']); + $object = preg_replace("/,".normalizePreg($this->config->current['BASE'])."/",$base,$line['object']); + $res.=" \n"; $res.=" ".$line['action'].""; $res.=" ".date("H:i:s d.m.Y",$line['timestamp']).""; - $res.=" ".preg_replace("/,/",", ",$line['user']).""; + $res.=" ".preg_replace("/,/",", ",$user).""; + $res.=" ".preg_replace("/,/",", ",$object).""; $res.=" ".$line['result'].""; if($line['repeated'] == 1){ $res.=" -"; diff --git a/plugins/addons/logview/gosa_log_contents.tpl b/plugins/addons/logview/gosa_log_contents.tpl index dda4503d0..9a66848c0 100644 --- a/plugins/addons/logview/gosa_log_contents.tpl +++ b/plugins/addons/logview/gosa_log_contents.tpl @@ -82,6 +82,7 @@ {t}Action{/t} {$mode0} {t}Date{/t} {$mode1} {t}User{/t} {$mode2} + {t}Object{/t} {$mode2} {t}Message{/t} {$mode3} {t}Repeated{/t} {$mode4} -- 2.30.2