From 28cd07d1a75c4e9dcaecac49efee0091f2fc62fa Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Thu, 07 Apr 2016 05:30:49 -0400
Subject: [PATCH] Implemented a checkbox "enable DNSSEC" in DNS-Wizard. This Checkbox can be enabled or disabled by template.

---
 server/plugins-available/maildrop_plugin.inc.php |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/maildrop_plugin.inc.php b/server/plugins-available/maildrop_plugin.inc.php
index 37b0306..5e05bc3 100644
--- a/server/plugins-available/maildrop_plugin.inc.php
+++ b/server/plugins-available/maildrop_plugin.inc.php
@@ -137,7 +137,11 @@
 				}
 
 				// Load the master template
-				$tpl = file_get_contents($conf["rootpath"].'/conf/autoresponder.master');
+				if(file_exists($conf["rootpath"].'/conf-custom/autoresponder.master')) {
+					$tpl = file_get_contents($conf["rootpath"].'/conf-custom/autoresponder.master');
+				} else {
+					$tpl = file_get_contents($conf["rootpath"].'/conf/autoresponder.master');
+				}
 				$tpl = str_replace('{vmail_mailbox_base}', $mail_config["homedir_path"], $tpl);
 
 				if ($data["new"]["autoresponder_start_date"] != '0000-00-00 00:00:00') { // Dates have been set
@@ -201,7 +205,11 @@
 				}
 
 				if($data["new"]["move_junk"] == 'y') {
-					$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
+					if(file_exists($conf["rootpath"].'/conf-custom/mailfilter_move_junk.master')) {
+						$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf-custom/mailfilter_move_junk.master')."\n";
+					} else {
+						$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
+					}
 				}
 				$mailfilter_content .= $data["new"]["custom_mailfilter"];
 

--
Gitblit v1.9.1