|
@@ 269-278 (lines=10) @@
|
| 266 |
|
|
| 267 |
|
// Now fill in hour data coming from the database which the mock event did *not* cater for in the data structure |
| 268 |
|
if (isset($db_events[$unit][Event::BAT_HOUR])) { |
| 269 |
|
foreach ($db_events[$unit][Event::BAT_HOUR] as $year => $months) { |
| 270 |
|
foreach ($months as $month => $days) { |
| 271 |
|
foreach ($days as $day => $hours) { |
| 272 |
|
foreach ($hours as $hour => $value) { |
| 273 |
|
$result[$year][$month][$day][$hour] = ((int) $value == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $value); |
| 274 |
|
} |
| 275 |
|
ksort($result[$year][$month][$day], SORT_NATURAL); |
| 276 |
|
} |
| 277 |
|
} |
| 278 |
|
} |
| 279 |
|
} |
| 280 |
|
|
| 281 |
|
return $result; |
|
@@ 318-327 (lines=10) @@
|
| 315 |
|
// Now fill in minute data coming from the database which the mock event did *not* cater for |
| 316 |
|
if (isset($db_events[$unit][Event::BAT_MINUTE])) { |
| 317 |
|
foreach ($db_events[$unit][Event::BAT_MINUTE] as $year => $months) { |
| 318 |
|
foreach ($months as $month => $days) { |
| 319 |
|
foreach ($days as $day => $hours) { |
| 320 |
|
foreach ($hours as $hour => $minutes) { |
| 321 |
|
foreach ($minutes as $minute => $value) { |
| 322 |
|
$result[$year][$month][$day][$hour][$minute] = ((int) $value == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $value); |
| 323 |
|
} |
| 324 |
|
ksort($result[$year][$month][$day][$hour], SORT_NATURAL); |
| 325 |
|
} |
| 326 |
|
} |
| 327 |
|
} |
| 328 |
|
} |
| 329 |
|
} |
| 330 |
|
|