From e376bd628578f816644eac5f2ae417f1f4cc76ef Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 29 Dec 2014 17:54:09 +0100 Subject: [PATCH] monitoring: Fix that exporting a object's history throws an exception fixes #6586 --- modules/monitoring/application/controllers/ShowController.php | 3 +-- .../monitoring/library/Monitoring/Object/MonitoredObject.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index efec6665a..ba865deaa 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -73,9 +73,8 @@ class Monitoring_ShowController extends Controller public function historyAction() { $this->getTabs()->activate('history'); - //$this->view->object->populate(); $this->view->object->fetchEventHistory(); - $this->view->history = $this->view->object->eventhistory->paginate($this->params->get('limit', 50)); + $this->view->history = $this->view->object->eventhistory->getQuery()->paginate($this->params->get('limit', 50)); $this->handleFormatRequest($this->view->object->eventhistory); $this->fetchHostStats(); } diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 4be004d99..2d9f1f30c 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -421,7 +421,7 @@ abstract class MonitoredObject if ($this->type === self::TYPE_SERVICE) { $eventHistory->where('service_description', $this->service_description); } - $this->eventhistory = $eventHistory->getQuery(); + $this->eventhistory = $eventHistory; return $this; }