Code

Updated page selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Dec 2009 15:22:57 +0000 (15:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Dec 2009 15:22:57 +0000 (15:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14912 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc

index fe25e7b9c2375b0b8691347374830f22d92e5bdb..da20ef51139e69f57acacc39a1c02ec96f813a0d 100644 (file)
@@ -176,12 +176,16 @@ class rsyslog extends plugin
       }
 
       if($result['count']){
+
+        if($result['count'] < $this->page) $this->page = 0;
+
         $filter.= "ORDER BY ".$this->sort_value." ".$this->sort_type." ";
         if($this->limit != "-"){
           $filter.= "LIMIT ".$this->page.", ".$this->limits[$this->limit];
         }else{
           $this->page = 0;
         }
+
         $query = "SELECT * ".$filter;
         $res = mysql_query($query, $link);
         if($res){