|
@@ 186-190 (lines=5) @@
|
| 183 |
|
$events[$unit][BAT_DAY][$year][$month][$day] = ((int)$db_events[$unit][BAT_DAY][$year][$month][$day] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int)$db_events[$unit][BAT_DAY][$year][$month][$day]); |
| 184 |
|
} |
| 185 |
|
} |
| 186 |
|
else { |
| 187 |
|
foreach ($days as $day => $value) { |
| 188 |
|
$events[$unit][BAT_DAY][$year][$month][$day] = $keyed_units[$unit]->getDefaultValue(); |
| 189 |
|
} |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
} |
| 193 |
|
} |
|
@@ 204-207 (lines=4) @@
|
| 201 |
|
if (isset($db_events[$unit][BAT_HOUR][$year][$month][$day][$hour])) { |
| 202 |
|
$events[$unit][BAT_HOUR][$year][$month]['d' . $day][$hour] = ((int)$db_events[$unit][BAT_DAY][$year][$month][$day][$hour] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int)$db_events[$unit][BAT_DAY][$year][$month][$day][$hour]); |
| 203 |
|
} |
| 204 |
|
else { |
| 205 |
|
// If nothing from db - then revert to the defaults |
| 206 |
|
$events[$unit][BAT_HOUR][$year][$month][$day][$hour] = (int)$keyed_units[$unit]->getDefaultValue(); |
| 207 |
|
} |
| 208 |
|
} |
| 209 |
|
} |
| 210 |
|
} |
|
@@ 235-238 (lines=4) @@
|
| 232 |
|
if (isset($db_events[$unit][BAT_MINUTE][$year][$month][$day][$hour][$minute])) { |
| 233 |
|
$events[$unit][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]); |
| 234 |
|
} |
| 235 |
|
else { |
| 236 |
|
// If nothing from db - then revert to the defaults |
| 237 |
|
$events[$unit][BAT_MINUTE][$year][$month][$day][$hour][$minute] = (int)$keyed_units[$unit]->getDefaultValue(); |
| 238 |
|
} |
| 239 |
|
} |
| 240 |
|
} |
| 241 |
|
} |