From 2b0c90661572c3b0601b84392e87d89113041587 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Tue, 27 Sep 2022 15:53:10 -0700 Subject: [PATCH] empty var fixes --- panel/classes/Panel/Vmail/AutorespondersAdd.php | 4 ++++ panel/classes/Panel/Vmail/AutorespondersEdit.php | 2 +- panel/classes/Panel/Vmail/ForwardsAdd.php | 3 +++ panel/ui/vmail/autoresponders-autoresponder.html | 3 --- panel/ui/vmail/mboxes-edit.html | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/panel/classes/Panel/Vmail/AutorespondersAdd.php b/panel/classes/Panel/Vmail/AutorespondersAdd.php index 5520c06..cae5fb0 100644 --- a/panel/classes/Panel/Vmail/AutorespondersAdd.php +++ b/panel/classes/Panel/Vmail/AutorespondersAdd.php @@ -22,6 +22,10 @@ class AutorespondersAdd extends \Panel\Vmail { static function get($f3) { + /* initialize autoresponder_array */ + $autoresponder_array = array('subject' => '', 'body' => '', 'mode' => 'Vacation', 'status' => '1'); + $f3->set('autoresponder_array', $autoresponder_array); + echo \Template::instance()->render('vmail/autoresponders-add.html'); } diff --git a/panel/classes/Panel/Vmail/AutorespondersEdit.php b/panel/classes/Panel/Vmail/AutorespondersEdit.php index 2ce4d87..9de0358 100644 --- a/panel/classes/Panel/Vmail/AutorespondersEdit.php +++ b/panel/classes/Panel/Vmail/AutorespondersEdit.php @@ -34,7 +34,7 @@ class AutorespondersEdit extends \Panel\Vmail { $body = substr_replace($body, "", -1); $autoresponder_array[0]['body'] = $body; - $autoresponders_array[$k] = $autoresponder_array; + $autoresponders_array[0] = $autoresponder_array; $f3->set('autoresponder_array', $autoresponder_array[0]); diff --git a/panel/classes/Panel/Vmail/ForwardsAdd.php b/panel/classes/Panel/Vmail/ForwardsAdd.php index 8cd8c49..8df9aeb 100644 --- a/panel/classes/Panel/Vmail/ForwardsAdd.php +++ b/panel/classes/Panel/Vmail/ForwardsAdd.php @@ -22,6 +22,9 @@ class ForwardsAdd extends \Panel\Vmail { static function get($f3) { + /* initialize forward_array */ + $forward_array = array('forward' => '', 'save_local' => '0'); + $f3->set('forward_array', $forward_array); echo \Template::instance()->render('vmail/forwards-add.html'); } diff --git a/panel/ui/vmail/autoresponders-autoresponder.html b/panel/ui/vmail/autoresponders-autoresponder.html index e26de0f..e616a55 100644 --- a/panel/ui/vmail/autoresponders-autoresponder.html +++ b/panel/ui/vmail/autoresponders-autoresponder.html @@ -3,9 +3,6 @@ - diff --git a/panel/ui/vmail/mboxes-edit.html b/panel/ui/vmail/mboxes-edit.html index 1413842..efd09ed 100644 --- a/panel/ui/vmail/mboxes-edit.html +++ b/panel/ui/vmail/mboxes-edit.html @@ -6,10 +6,10 @@ Edit Email Account {{ @PARAMS.mbox }}@{{ @PARAMS.domain }} (All fields are required) - + - +
Subject: