From b80b480fbae5522ac96d1262e96ec3e1e6afab39 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Tue, 12 Nov 2024 18:41:52 +0100 Subject: [PATCH] Fixed subject in MaintenanceNotification Index --- Layout/default/MaintenanceNotification/Index.php | 2 +- .../MaintenanceNotification/MaintenanceNotification.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Layout/default/MaintenanceNotification/Index.php b/Layout/default/MaintenanceNotification/Index.php index e87f2da9f..c9e4d22e7 100644 --- a/Layout/default/MaintenanceNotification/Index.php +++ b/Layout/default/MaintenanceNotification/Index.php @@ -85,7 +85,7 @@ - subject?> + subject->subject?> plz) ? implode(", ", $notification->plzs) : ""?> send_ts) ? date("d.m.Y H:i", $notification->send_ts) : ""?> sent) ? "Ja" : "nein"?> diff --git a/application/MaintenanceNotification/MaintenanceNotification.php b/application/MaintenanceNotification/MaintenanceNotification.php index ad8e915b6..1696d0248 100644 --- a/application/MaintenanceNotification/MaintenanceNotification.php +++ b/application/MaintenanceNotification/MaintenanceNotification.php @@ -1,12 +1,21 @@ $name == null) { + if($name == "subject") { + $subject = new MaintenanceNotificationTemplate($this->subject_id); + if($subject) { + $this->subject = $subject; + } + return $this->subject; + } + if($name == "plzs") { if(!$this->plz) return []; $plzs = json_decode($this->plz);