|
@@ 282-291 (lines=10) @@
|
| 279 |
|
|
| 280 |
|
// Now fill in hour data coming from the database which the mock event did *not* cater for in the data structure |
| 281 |
|
if (isset($db_events[$unit][Event::BAT_HOUR])) { |
| 282 |
|
foreach ($db_events[$unit][Event::BAT_HOUR] as $year => $months) { |
| 283 |
|
foreach ($months as $month => $days) { |
| 284 |
|
foreach ($days as $day => $hours) { |
| 285 |
|
foreach ($hours as $hour => $value) { |
| 286 |
|
$result[$year][$month][$day][$hour] = ((int) $value == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $value); |
| 287 |
|
} |
| 288 |
|
ksort($result[$year][$month][$day], SORT_NATURAL); |
| 289 |
|
} |
| 290 |
|
} |
| 291 |
|
} |
| 292 |
|
} |
| 293 |
|
|
| 294 |
|
return $result; |
|
@@ 333-342 (lines=10) @@
|
| 330 |
|
// Now fill in minute data coming from the database which the mock event did *not* cater for |
| 331 |
|
if (isset($db_events[$unit][Event::BAT_MINUTE])) { |
| 332 |
|
foreach ($db_events[$unit][Event::BAT_MINUTE] as $year => $months) { |
| 333 |
|
foreach ($months as $month => $days) { |
| 334 |
|
foreach ($days as $day => $hours) { |
| 335 |
|
foreach ($hours as $hour => $minutes) { |
| 336 |
|
foreach ($minutes as $minute => $value) { |
| 337 |
|
$result[$year][$month][$day][$hour][$minute] = ((int) $value == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $value); |
| 338 |
|
} |
| 339 |
|
ksort($result[$year][$month][$day][$hour], SORT_NATURAL); |
| 340 |
|
} |
| 341 |
|
} |
| 342 |
|
} |
| 343 |
|
} |
| 344 |
|
} |
| 345 |
|
|