diff --git a/restricted/automations.php b/restricted/automations.php index f2690f9..e575797 100644 --- a/restricted/automations.php +++ b/restricted/automations.php @@ -630,10 +630,15 @@ function saveAutomation($data) throw new RuntimeException("Automatik " . $id . " gibt es nicht mehr."); } + // changed wird ausdruecklich mitgeschrieben. Es haengt zwar an + // ON UPDATE, das greift aber nur, wenn sich hier oben wirklich + // eine Spalte aendert - wer nur eine Bedingung verstellt, laesst + // Name, Stockwerk und Fenster ja unberuehrt. Der Runner sieht am + // Zeitstempel, dass er sein Regelwerk neu laden muss. $stmt = $db->prepare("UPDATE automations SET name = ?, floor = ?, enabled = ?, window_from = ?, window_to = ?, weekdays = ?, on_vacation = ?, on_holiday = ?, force_once = ?, - lockout_secs = ? + lockout_secs = ?, changed = NOW() WHERE id = ?"); $stmt->bind_param("ssissiiiiii", $name, $floor, $enabled, $windowFrom, $windowTo, $weekdays, $onVacation, $onHoliday, $forceOnce, $lockout, $id);