tweaked filters in send-maintenance-notifications.php
This commit is contained in:
@@ -138,18 +138,21 @@ class MaintenanceNotificationController extends mfBaseController {
|
||||
$data["to"] = $to->getTimestamp();
|
||||
|
||||
|
||||
try {
|
||||
$send_ts = new DateTime($r->sendts_day." ".$r->sendts_hour.":00");
|
||||
//var_dump($send_ts);exit;
|
||||
} catch(Exception $e) {
|
||||
$this->layout()->setFlash("Ungültige Versandzeitpunkt", "error");
|
||||
if($mode = "edit") {
|
||||
return $this->editAction();
|
||||
if($r->sendts_day && $r->sendts_hour) {
|
||||
try {
|
||||
$send_ts = new DateTime($r->sendts_day . " " . $r->sendts_hour . ":00");
|
||||
//var_dump($send_ts);exit;
|
||||
} catch(Exception $e) {
|
||||
$this->layout()->setFlash("Ungültige Versandzeitpunkt", "error");
|
||||
if($mode = "edit") {
|
||||
return $this->editAction();
|
||||
}
|
||||
return $this->addAction();
|
||||
}
|
||||
return $this->addAction();
|
||||
$data["send_ts"] = $send_ts->getTimestamp();
|
||||
} else {
|
||||
$data["send_ts"] = null;
|
||||
}
|
||||
$data["send_ts"] = $send_ts->getTimestamp();
|
||||
|
||||
|
||||
if($mode == "add") {
|
||||
$notification = MaintenanceNotification::create($data);
|
||||
|
||||
Reference in New Issue
Block a user