Revert "Don't fetchAll() and loop afterwards in the alert summary report"

This reverts commit f3ca80ffce.
This commit is contained in:
Alexander A. Klimov 2015-04-28 12:52:59 +02:00
parent f3ca80ffce
commit d27b94dcec
1 changed files with 2 additions and 1 deletions

View File

@ -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);