summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a6e4ed)
raw | patch | inline | side by side (parent: 0a6e4ed)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 23 Nov 2007 08:52:45 +0000 (08:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 23 Nov 2007 08:52:45 +0000 (08:52 +0000) |
Enabled sorting for result and repeats
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7864 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7864 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/logview/class_gosa_logview.inc | patch | blob | history | |
plugins/addons/logview/gosa_log_contents.tpl | patch | blob | history |
diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc
index 3d1f5a5a74e58d2ece1a67c906e20b1c8d189392..e538cb0be42d4e7bd2b92f2a06bad52bcba298bc 100644 (file)
var $sort = 1;
var $sort_direction = "down";
- var $fields = array("action","timestamp","object","user","result","repeated");
+ var $fields = array("action","timestamp","user","objecttype","object","result","repeated");
var $range = 25;
var $view_logged = FALSE;
$smarty->assign("mode2", "");
$smarty->assign("mode3", "");
$smarty->assign("mode4", "");
+ $smarty->assign("mode5", "");
+ $smarty->assign("mode6", "");
/* Assign select option content */
foreach( array("server", "action", "time", "regex") as $type){
if(!preg_match("/r/",$acls)){
$res = "<tr>
- <td colspan=4>
+ <td colspan=".count($this->fields).">
"._("You have insufficient permissions to view syslog entries.")."
</td>
</tr>";
$res.=" <td title='".$line['objecttype']."'>".$line['action']."</td>";
$res.=" <td>".date("H:i:s d.m.Y",$line['timestamp'])."</td>";
$res.=" <td title='".$line['user']."'>".preg_replace("/,/",", ",$user)."</td>";
+ $res.=" <td title='".$line['objecttype']."'>".$line['objecttype']."</td>";
$res.=" <td title='".$line['object']."'>".preg_replace("/,/",", ",$object)."</td>";
$res.=" <td>".$line['result']."</td>";
if($line['repeated'] == 1){
}
$this->sort= (int)$_GET['sort'];
- if ($this->sort < 0 || $this->sort > 4){
+ if ($this->sort < 0 || $this->sort > count($this->fields)){
$this->sort= 0;
}
}
diff --git a/plugins/addons/logview/gosa_log_contents.tpl b/plugins/addons/logview/gosa_log_contents.tpl
index 9a66848c0ea61cb23545fa5d6e376eb38e827889..dcc9dd1e701fb8f668e0144a683578ac614c8816 100644 (file)
<td><a href=main.php{$plug}&sort=0&direction={$direction}>{t}Action{/t} {$mode0}</a></td>
<td><a href=main.php{$plug}&sort=1&direction={$direction}>{t}Date{/t} {$mode1}</a></td>
<td><a href=main.php{$plug}&sort=2&direction={$direction}>{t}User{/t} {$mode2}</a></td>
- <td><a href=main.php{$plug}&sort=2&direction={$direction}>{t}Object{/t} {$mode2}</a></td>
- <td><a href=main.php{$plug}&sort=3&direction={$direction}>{t}Message{/t} {$mode3}</a></td>
- <td><a href=main.php{$plug}&sort=4&direction={$direction}>{t}Repeated{/t} {$mode4}</a></td>
+ <td><a href=main.php{$plug}&sort=3&direction={$direction}>{t}Object type{/t} {$mode3}</a></td>
+ <td><a href=main.php{$plug}&sort=4&direction={$direction}>{t}Object{/t} {$mode4}</a></td>
+ <td><a href=main.php{$plug}&sort=5&direction={$direction}>{t}Message{/t} {$mode5}</a></td>
+ <td><a href=main.php{$plug}&sort=6&direction={$direction}>{t}Repeated{/t} {$mode6}</a></td>
</tr>
{$search_result}
</table>