[icinga-checkins] icinga.org: icinga-web/mhein/default: * Applied patch to fix initial pagination (THANKS TO Mr. Gelf) fixes #2058

git at icinga.org git at icinga.org
Wed Nov 16 16:55:37 CET 2011


Module: icinga-web
Branch: mhein/default
Commit: 42223ed4e17743961b39834ed6c82c4415357044
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=42223ed4e17743961b39834ed6c82c4415357044

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Nov 16 16:41:09 2011 +0100

* Applied patch to fix initial pagination (THANKS TO Mr. Gelf) fixes #2058

---

 .../views/System/ViewProcSuccessView.class.php     |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/modules/Cronks/views/System/ViewProcSuccessView.class.php b/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
index 62c7204..9073a2a 100644
--- a/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
+++ b/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
@@ -63,8 +63,12 @@ class Cronks_System_ViewProcSuccessView extends CronksBaseView {
 
             if (is_numeric($rd->getParameter('page_start')) && is_numeric($rd->getParameter('page_limit'))) {
                 $worker->setResultLimit($rd->getParameter('page_start'), $rd->getParameter('page_limit'));
+            } else {
+                $user = $this->context->getUser();
+                $worker->setResultLimit(0, $user->getPrefVal('org.icinga.grid.pagerMaxItems', AgaviConfig::get('modules.cronks.grid.pagerMaxItems', 25)));
             }
 
+
             if ($rd->getParameter('sort_field', null) !== null) {
                 $worker->setOrderColumn($rd->getParameter('sort_field'), $rd->getParameter('sort_dir', 'ASC'));
             }
@@ -95,5 +99,3 @@ class Cronks_System_ViewProcSuccessView extends CronksBaseView {
         return json_encode($data);
     }
 }
-
-?>
\ No newline at end of file





More information about the icinga-checkins mailing list