From 99e82634476e434d243a4f2839d3bdbc5471a071 Mon Sep 17 00:00:00 2001 From: Iglocska Date: Wed, 9 Dec 2015 02:29:04 +0100 Subject: [PATCH] Small fixes --- app/Controller/ServersController.php | 3 ++- app/View/Users/admin_view.ctp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Controller/ServersController.php b/app/Controller/ServersController.php index 5adb4f24a..e690fc722 100755 --- a/app/Controller/ServersController.php +++ b/app/Controller/ServersController.php @@ -98,7 +98,8 @@ class ServersController extends AppController { $customPagination = new CustomPaginationTool(); $params = $customPagination->createPaginationRules($events, $this->passedArgs, $this->alias); $this->params->params['paging'] = array($this->modelClass => $params); - $customPagination->truncateByPagination($events, $params); + if (is_array($events)) $customPagination->truncateByPagination($events, $params); + else ($events = array()); $this->set('events', $events); $this->set('eventDescriptions', $this->Event->fieldDescriptions); $this->set('analysisLevels', $this->Event->analysisLevels); diff --git a/app/View/Users/admin_view.ctp b/app/View/Users/admin_view.ctp index e21aeeee9..3cfa1901e 100755 --- a/app/View/Users/admin_view.ctp +++ b/app/View/Users/admin_view.ctp @@ -13,7 +13,7 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
- +