From d97b37f83fc9c5dadfe92dc405af9dce352dc332 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 11 Jun 2025 14:57:54 -0400 Subject: [PATCH] Don't do pagination in events.This may break users of API but pagination should only happen if asked for --- web/api/app/Controller/EventsController.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index 9a1181253..935c7d6d8 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -99,17 +99,8 @@ class EventsController extends AppController { } $settings['conditions'] = array($conditions, $mon_options); - // How many events to return - $this->loadModel('Config'); - $limit = $this->Config->find('list', array( - 'conditions' => array('Name' => 'ZM_WEB_EVENTS_PER_PAGE'), - 'fields' => array('Name', 'Value') - )); - $this->Paginator->settings = $settings; - $events = $this->Paginator->paginate('Event'); - - // For each event, get the frameID which has the largest score - // also add FS path + $events = $this->Event->find('all', $settings); + // For each event, get the frameID which has the largest score also add FS path foreach ( $events as $key => $value ) { $EventObj = new ZM\Event($value['Event']);