From a0b8ed3226060074c5aaf2cf0ba3bc6d774164bb Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 29 May 2007 09:11:00 +0000 Subject: [PATCH] Updated sorting git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6502 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/logview/class_gosa_logview.inc | 18 +++++++++++------- plugins/addons/logview/gosa_log_contents.tpl | 8 ++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc index 742149ff7..ca2cfcf80 100644 --- a/plugins/addons/logview/class_gosa_logview.inc +++ b/plugins/addons/logview/class_gosa_logview.inc @@ -273,6 +273,8 @@ class gosa_logview extends plugin $smarty->assign("actions",$actions); $smarty->assign("date_select", $date_select); + $smarty->assign("direction", $this->sort_direction); + /* Show main page */ return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE))); } @@ -280,6 +282,7 @@ class gosa_logview extends plugin function save_object() { + $_SESSION['kekse'][] = get_class($this)."->save_object"; /* Get submitted range */ if(isset($_POST['EntriesPerPage'])){ if(is_numeric($_POST['EntriesPerPage'])){ @@ -315,14 +318,13 @@ class gosa_logview extends plugin /* Adapt sorting */ if (isset($_GET['sort'])){ - if ($this->sort == (int)$_GET['sort']){ - if ($this->sort_direction == "down"){ - $this->sort_direction= "up"; - } else { - $this->sort_direction= "down"; - } + + if($_GET['direction'] == "up"){ + $this->sort_direction = "down"; + }else{ + $this->sort_direction = "up"; } - + $this->sort= (int)$_GET['sort']; if ($this->sort < 0 || $this->sort > 3){ $this->sort= 0; @@ -334,6 +336,8 @@ class gosa_logview extends plugin foreach(array("action","server","time","regex") as $attr){ $_SESSION['logview']['gosa_log'][$attr] = $this->$attr; } + + } diff --git a/plugins/addons/logview/gosa_log_contents.tpl b/plugins/addons/logview/gosa_log_contents.tpl index c01f6b434..824963789 100644 --- a/plugins/addons/logview/gosa_log_contents.tpl +++ b/plugins/addons/logview/gosa_log_contents.tpl @@ -79,10 +79,10 @@ {if $search_result ne ""} - - - - + + + + {$search_result}
{t}Action{/t} {$mode0}{t}Object{/t} {$mode1}{t}Date{/t} {$mode2}{t}Message{/t} {$mode3}{t}Action{/t} {$mode0}{t}Object{/t} {$mode1}{t}Date{/t} {$mode2}{t}Message{/t} {$mode3}
-- 2.30.2