Code

Added new rangeselector
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Nov 2005 06:38:06 +0000 (06:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Nov 2005 06:38:06 +0000 (06:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2030 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofax/reports/class_faxreport.inc

index 0bddbf0ed62575f4d47601391adc615d340d5269..d25ff4695d035bf4d46b5ef4d807f873476ff52b 100644 (file)
@@ -18,6 +18,8 @@ class faxreport extends plugin
   var $userfilter= "";
   var $ui= NULL;
 
+  var $range = 20;
+
   /* Constant stuff */
   var $status= array( "SENT", "MAILED", "SERROR", "RERROR", "SBLOCK", "RBLOCK",
                        "DELETED", "REQUEUED", "DISABLED", "PRINTED", "DIVERTED",
@@ -61,6 +63,10 @@ class faxreport extends plugin
        /* Call parent execute */
        plugin::execute();
 
+       if(isset($_POST['EntriesPerPage'])){
+               $this->range = $_POST['EntriesPerPage'];
+       }
+
        /* Get template engine */
        $smarty= get_smarty();
        $faxfilter= get_global("faxreportfilter");
@@ -266,7 +272,7 @@ class faxreport extends plugin
                        $mod++;
                        continue;
                }
-               if ($mod >= ($this->start + 20)){
+               if ($mod >= ($this->start + $this->range)){
                        $mod++;
                        break;
                }
@@ -298,7 +304,7 @@ class faxreport extends plugin
 
        if (isset($fax_users) && count($fax_users)){
                $smarty->assign("search_result", $output);
-               $smarty->assign("range_selector", range_selector(count($this->report_list), $this->start, 20));
+               $smarty->assign("range_selector", range_selector(count($this->report_list), $this->start, $this->range,"EntriesPerPage"));
        }else{
                $smarty->assign("search_result", "");
        }