|
@@ 182-186 (lines=5) @@
|
| 179 |
|
$events[$unit][Event::BAT_DAY][$year][$month][$day] = ((int)$db_events[$unit][Event::BAT_DAY][$year][$month][$day] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int)$db_events[$unit][Event::BAT_DAY][$year][$month][$day]); |
| 180 |
|
} |
| 181 |
|
} |
| 182 |
|
else { |
| 183 |
|
foreach ($days as $day => $value) { |
| 184 |
|
$events[$unit][Event::BAT_DAY][$year][$month][$day] = $keyed_units[$unit]->getDefaultValue(); |
| 185 |
|
} |
| 186 |
|
} |
| 187 |
|
} |
| 188 |
|
} |
| 189 |
|
|
|
@@ 200-203 (lines=4) @@
|
| 197 |
|
if (isset($db_events[$unit][Event::BAT_HOUR][$year][$month][$day][$hour])) { |
| 198 |
|
$events[$unit][Event::BAT_HOUR][$year][$month]['d' . $day][$hour] = ((int)$db_events[$unit][Event::BAT_DAY][$year][$month][$day][$hour] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int)$db_events[$unit][BAT_DAY][$year][$month][$day][$hour]); |
| 199 |
|
} |
| 200 |
|
else { |
| 201 |
|
// If nothing from db - then revert to the defaults |
| 202 |
|
$events[$unit][Event::BAT_HOUR][$year][$month][$day][$hour] = (int)$keyed_units[$unit]->getDefaultValue(); |
| 203 |
|
} |
| 204 |
|
} |
| 205 |
|
} |
| 206 |
|
} |
|
@@ 233-236 (lines=4) @@
|
| 230 |
|
if (isset($db_events[$unit][Event::BAT_MINUTE][$year][$month][$day][$hour][$minute])) { |
| 231 |
|
$events[$unit][Event::BAT_MINUTE][$year][$month]['d' .$day]['h'.$hour][$minute] = ((int)$db_events[$unit][BAT_DAY][$year][$month][$day][$hour][$minute] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int)$db_events[$unit][BAT_DAY][$year][$month][$day][$hour][$minute]); |
| 232 |
|
} |
| 233 |
|
else { |
| 234 |
|
// If nothing from db - then revert to the defaults |
| 235 |
|
$events[$unit][Event::BAT_MINUTE][$year][$month][$day][$hour][$minute] = (int)$keyed_units[$unit]->getDefaultValue(); |
| 236 |
|
} |
| 237 |
|
} |
| 238 |
|
} |
| 239 |
|
} |