From: hickert Date: Mon, 26 Nov 2007 12:03:42 +0000 (+0000) Subject: Fixed unfdefined index warnings in gosa_log_view X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c649d160a4810761bd4f7fc943d336cf663885f8;p=gosa.git Fixed unfdefined index warnings in gosa_log_view git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7887 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc index f591f79e7..847800380 100644 --- a/plugins/addons/logview/class_gosa_logview.inc +++ b/plugins/addons/logview/class_gosa_logview.inc @@ -303,61 +303,63 @@ class gosa_logview extends plugin function save_object() { - /* Get submitted range */ - if(isset($_POST['EntriesPerPage'])){ - if(is_numeric($_POST['EntriesPerPage'])){ - $this->range = $_POST['EntriesPerPage']; + if(isset($_POST['gosa_log_contents_posted'])){ + + /* Get submitted range */ + if(isset($_POST['EntriesPerPage'])){ + if(is_numeric($_POST['EntriesPerPage'])){ + $this->range = $_POST['EntriesPerPage']; + } } - } - /* Get actual select boxe values */ - $logfilter_changed = FALSE; - foreach( array("server", "action","time","regex") as $type){ - if(isset($_POST[$type])){ - $this->$type = $_POST[$type]; + /* Get actual select boxe values */ + $logfilter_changed = FALSE; + foreach( array("server", "action","time","regex") as $type){ + if(isset($_POST[$type])){ + $this->$type = $_POST[$type]; + } } - } - /* Filter regex values */ - if ($this->regex == ""){ - $this->regex= '*'; - } else { - $new = preg_replace('/\*\**/', '*', $this->regex); - $this->regex= $new; - } + /* Filter regex values */ + if ($this->regex == ""){ + $this->regex= '*'; + } else { + $new = preg_replace('/\*\**/', '*', $this->regex); + $this->regex= $new; + } - /* Set start value */ - if (isset($_GET['start'])){ - $this->start= (int)$_GET['start']; - } - - /* Reset page number if filter has changed */ - if ($logfilter_changed > 0){ - $this->start= 0; - } + /* Set start value */ + if (isset($_GET['start'])){ + $this->start= (int)$_GET['start']; + } + + /* Reset page number if filter has changed */ + if ($logfilter_changed > 0){ + $this->start= 0; + } - /* Adapt sorting */ - if (isset($_GET['sort'])){ + /* Adapt sorting */ + if (isset($_GET['sort'])){ + + if($_GET['direction'] == "up"){ + $this->sort_direction = "down"; + }else{ + $this->sort_direction = "up"; + } - if($_GET['direction'] == "up"){ - $this->sort_direction = "down"; - }else{ - $this->sort_direction = "up"; + $this->sort= (int)$_GET['sort']; + if ($this->sort < 0 || $this->sort > count($this->fields)){ + $this->sort= 0; + } } - $this->sort= (int)$_GET['sort']; - if ($this->sort < 0 || $this->sort > count($this->fields)){ - $this->sort= 0; + /* Save attributes in Sessiob, so we are able to recontruct filter on plugin reload */ + $_SESSION['logview']['gosa_log'] = array(); + foreach(array("action","server","time","regex") as $attr){ + $_SESSION['logview']['gosa_log'][$attr] = $this->$attr; } - } - /* Save attributes in Sessiob, so we are able to recontruct filter on plugin reload */ - $_SESSION['logview']['gosa_log'] = array(); - 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 d037e2dee..4a9f3c9cb 100644 --- a/plugins/addons/logview/gosa_log_contents.tpl +++ b/plugins/addons/logview/gosa_log_contents.tpl @@ -3,7 +3,7 @@
- +
@@ -99,7 +99,7 @@ {else} {t}Search returned no results...{/t} {/if} - +