From d27b94dcecdd18b59912c851234b80fdd5d93cec Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 28 Apr 2015 12:52:59 +0200 Subject: [PATCH] Revert "Don't fetchAll() and loop afterwards in the alert summary report" This reverts commit f3ca80ffced18497322a74b8b49e94e88bb31cdc. --- .../application/controllers/AlertsummaryController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index 5b4e2e3fa..dcc805286 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -274,6 +274,7 @@ class Monitoring_AlertsummaryController extends Controller ); $defects = array(); + $records = $query->getQuery()->fetchAll(); $period = $this->createPeriod($interval); foreach ($period as $entry) { @@ -281,7 +282,7 @@ class Monitoring_AlertsummaryController extends Controller $defects[$id] = array($id, 0); } - foreach ($query as $item) { + foreach ($records as $item) { $id = $this->getPeriodFormat($interval, $item->timestamp); if (empty($defects[$id])) { $defects[$id] = array($id, 0);