@@ 298-307 (lines=10) @@ | ||
295 | ||
296 | // Now fill in hour data coming from the database which the mock event did *not* cater for in the data structure |
|
297 | if (isset($db_events[$unit][Event::BAT_HOUR])) { |
|
298 | foreach ($db_events[$unit][Event::BAT_HOUR] as $year => $months) { |
|
299 | foreach ($months as $month => $days) { |
|
300 | foreach ($days as $day => $hours) { |
|
301 | foreach ($hours as $hour => $value) { |
|
302 | $result[$year][$month][$day][$hour] = ((int) $value == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $value); |
|
303 | } |
|
304 | ksort($result[$year][$month][$day], SORT_NATURAL); |
|
305 | } |
|
306 | } |
|
307 | } |
|
308 | } |
|
309 | ||
310 | return $result; |
|
@@ 349-358 (lines=10) @@ | ||
346 | // Now fill in minute data coming from the database which the mock event did *not* cater for |
|
347 | if (isset($db_events[$unit][Event::BAT_MINUTE])) { |
|
348 | foreach ($db_events[$unit][Event::BAT_MINUTE] as $year => $months) { |
|
349 | foreach ($months as $month => $days) { |
|
350 | foreach ($days as $day => $hours) { |
|
351 | foreach ($hours as $hour => $minutes) { |
|
352 | foreach ($minutes as $minute => $value) { |
|
353 | $result[$year][$month][$day][$hour][$minute] = ((int) $value == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $value); |
|
354 | } |
|
355 | ksort($result[$year][$month][$day][$hour], SORT_NATURAL); |
|
356 | } |
|
357 | } |
|
358 | } |
|
359 | } |
|
360 | } |
|
361 |