From fe0fb41d0444745ff3c8d6e60b028ba2fd006e0e Mon Sep 17 00:00:00 2001 From: Claire DELBOS Date: Fri, 14 Apr 2017 09:34:29 +0200 Subject: [PATCH] SD-28 --- .../modules/default/controllers/IdentiteController.php | 4 ++++ .../modules/default/controllers/JuridiqueController.php | 9 ++++++--- .../default/controllers/SurveillanceController.php | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/application/modules/default/controllers/IdentiteController.php b/application/modules/default/controllers/IdentiteController.php index 34d453765..d6ff21e80 100644 --- a/application/modules/default/controllers/IdentiteController.php +++ b/application/modules/default/controllers/IdentiteController.php @@ -407,6 +407,8 @@ class IdentiteController extends Zend_Controller_Action } } else { $pageTotal = $pageCurrent = 1; + $pagePrev = 1; + $pageNext = 1; } $this->view->assign('PageTotal', $pageTotal); $this->view->assign('PagePrev', $pagePrev); @@ -1171,6 +1173,8 @@ class IdentiteController extends Zend_Controller_Action } } else { $pageTotal = $pageCurrent = 1; + $pagePrev = 1; + $pageNext = 1; } $this->view->assign('PageTotal', $pageTotal); $this->view->assign('PagePrev', $pagePrev); diff --git a/application/modules/default/controllers/JuridiqueController.php b/application/modules/default/controllers/JuridiqueController.php index 8c66a41e7..34c2f92fe 100644 --- a/application/modules/default/controllers/JuridiqueController.php +++ b/application/modules/default/controllers/JuridiqueController.php @@ -154,6 +154,8 @@ class JuridiqueController extends Zend_Controller_Action } } else { $pageTotal = $pageCurrent = 1; + $pagePrev = 1; + $pageNext = 1; } $this->view->assign('PageTotal', $pageTotal); $this->view->assign('PagePrev', $pagePrev); @@ -384,9 +386,6 @@ class JuridiqueController extends Zend_Controller_Action $this->view->List = isset($response->List->item)?$response->List->item:null; // --- Pagination $nbReponsesTotal = $response->Nb; - $pageTotal = $pageCurrent = 1; - $pagePrev = null; - $pageNext = null; if ($nbReponses < $nbReponsesTotal) { $pageTotal = ceil( $nbReponsesTotal / $nbReponses ); $pageCurrent = $page; @@ -398,6 +397,10 @@ class JuridiqueController extends Zend_Controller_Action if( $pageNext > $pageTotal ) { $pageNext = $pageTotal; } + } else { + $pageTotal = $pageCurrent = 1; + $pagePrev = 1; + $pageNext = 1; } $this->view->assign('PageTotal', $pageTotal); $this->view->assign('PagePrev', $pagePrev); diff --git a/application/modules/default/controllers/SurveillanceController.php b/application/modules/default/controllers/SurveillanceController.php index 0b752af7a..18b7fe56b 100644 --- a/application/modules/default/controllers/SurveillanceController.php +++ b/application/modules/default/controllers/SurveillanceController.php @@ -425,6 +425,8 @@ class SurveillanceController extends Zend_Controller_Action } } else { $pageTotal = $pageCurrent = 1; + $pagePrev = 1; + $pageNext = 1; } $this->view->assign('PageTotal', $pageTotal); $this->view->assign('PagePrev', isset($pagePrev)?$pagePrev:1); @@ -644,6 +646,8 @@ class SurveillanceController extends Zend_Controller_Action } } else { $pageTotal = $pageCurrent = 1; + $pagePrev = 1; + $pageNext = 1; } $this->view->assign('PageTotal', $pageTotal); $this->view->assign('PagePrev', $pagePrev);