Przeglądaj źródła

Backward compatible with portal not having daily_start/daily_stop times

tags/1.0.19
ymlam 2 lat temu
rodzic
commit
6bd4ca1af3
1 zmienionych plików z 4 dodań i 4 usunięć
  1. +4
    -4
      src/main/java/altk/comm/engine/Broadcast.java

+ 4
- 4
src/main/java/altk/comm/engine/Broadcast.java Wyświetl plik

@@ -1112,7 +1112,9 @@ public abstract class Broadcast
}
private boolean withinOperatingHours() {
if (daily_start == null || daily_start.trim().length() == 0) return true;
int dailyStartMin = convert2Min(daily_start);
if (daily_stop == null || daily_stop.trim().length() == 0) return true;
int dailyStopMin = convert2Min(daily_stop);
// Ensure daily stop > daily start
if (dailyStopMin < dailyStartMin) dailyStopMin += 24 * 60;
@@ -1458,10 +1460,8 @@ public abstract class Broadcast
boolean timeChanged = false;
for (String key : new String[] {DAILY_STOP_KEY, DAILY_START_KEY}) {
String value = (String)configuration.get(key);
if (value != null) {
if (setOperatingHours(key, value)) {
timeChanged = true;
}
if (setOperatingHours(key, value)) {
timeChanged = true;
}
}
if (timeChanged) enforceOperationHours();


Ładowanie…
Anuluj
Zapisz