Code

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

plugins/addons/logview/class_logview.inc

index e97f68b7e786236275beb3f1a1d50fe8e371ebeb..f1ebe05183ee71be10a4bda5cb07e5c31894e5b6 100644 (file)
@@ -16,6 +16,7 @@ class logview extends plugin
   var $loglevellist= array();
   var $tilist= array();
   var $fields= array("log_level", "host", "time_stamp", "message");
+  var $range = 25;
 
   function logview ($config, $dn= NULL)
   {
@@ -93,6 +94,10 @@ class logview extends plugin
        /* Call parent execute */
        plugin::execute();
 
+       if(isset($_POST['EntriesPerPage'])){
+               $this->range = $_POST['EntriesPerPage'];
+       }
+
        /* Ignore if not defined */
        if (!isset($this->config->data['SERVERS']['LOG'])){
                return;
@@ -158,7 +163,7 @@ class logview extends plugin
                        $line= mysql_fetch_array($result, MYSQL_ASSOC);
                        $count= $line['COUNT(*)'];
                        if ($count > 25){
-                               $smarty->assign("range_selector", range_selector($count, $this->start, 25));
+                               $smarty->assign("range_selector", range_selector($count, $this->start, $this->range,"EntriesPerPage"));
                        }
 
                        /* Assemble time query */