Skip to content

Commit

Permalink
Revert "Don't fetchAll() and loop afterwards in the alert summary rep…
Browse files Browse the repository at this point in the history
…ort"

This reverts commit f3ca80f.
  • Loading branch information
Al2Klimov committed Apr 28, 2015
1 parent f3ca80f commit d27b94d
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -274,14 +274,15 @@ private function createProblemData()
);

$defects = array();
$records = $query->getQuery()->fetchAll();
$period = $this->createPeriod($interval);

foreach ($period as $entry) {
$id = $this->getPeriodFormat($interval, $entry->getTimestamp());
$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);
Expand Down

0 comments on commit d27b94d

Please sign in to comment.