Code

Updated fax listing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Apr 2010 14:03:19 +0000 (14:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Apr 2010 14:03:19 +0000 (14:03 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17471 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc

index 2772a9b8641290beea30c751200c49a1f276dbf5..f3f2bc49bbe239a2c18d17f9848d1cdab188c0f7 100644 (file)
@@ -257,7 +257,8 @@ class faxreport extends plugin
         $query_entries = "SELECT id,uid,date_format(queuing_time, '%Y%m%d%H%i%s') as queuing_time,".
             "status,sender_id,receiver_id,pages FROM faxlog ".
             "WHERE {$userfilter} AND queuing_time <= {$end} AND ".
-            "queuing_time >= {$start} ORDER BY ".$this->fields[$this->sort].
+            "queuing_time >= {$start} ".
+            "ORDER BY ".$this->fields[$this->sort].
             " {$desc } ";
 
 
@@ -355,10 +356,12 @@ class faxreport extends plugin
         mysql_close($link);
 
         $entry_count = count($report_list);
+        if($this->start >=$entry_count) $this->start =0;
 
         /* Generate output */
         $mod= 0;
         $output= "";
+        $report_list = array_slice($report_list, $this->start, $this->range);
         foreach ($report_list as $val){
             $output.= "\n<tr>{$val}</tr>";
         }