From ab7597c7ec2d62aadf82c4c647d3dc63dae8de90 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Thu, 16 Aug 2012 14:53:05 -0400
Subject: [PATCH] Implemented  FS#2379 - Add perl option to web sites (apache2 mod_perl2) Fixed (partly) FS#2310 - Template switch not working in mailuser module, for dashlets and the login page

---
 server/plugins-available/maildrop_plugin.inc.php |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/server/plugins-available/maildrop_plugin.inc.php b/server/plugins-available/maildrop_plugin.inc.php
index f35fcd5..085a992 100644
--- a/server/plugins-available/maildrop_plugin.inc.php
+++ b/server/plugins-available/maildrop_plugin.inc.php
@@ -125,7 +125,7 @@
 			$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.vacation.msg';
 			if(is_file($file)) unlink($file) or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
 			$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.autoresponder';
-			if(is_file($file)) unlink($ar_file) or $app->log("Unable to delete file: $ar_file",LOGLEVEL_WARN);
+			if(is_file($file)) unlink($file) or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
 			
 			
 			//Now we create the new autoresponder, if it is enabled
@@ -211,10 +211,14 @@
 					unset($config_file_path);
 				} else {
 					// Delete the mailfilter recipe
-					$email_parts = explode("@",$data["old"]["email"]);
-					$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.mailfilter';
-					if(is_file($file)) unlink($file)  or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
-					$app->log("Deleting custom Mailfiter".$file,LOGLEVEL_DEBUG);
+					if(isset($data["old"]["email"])) {
+						$email_parts = explode("@",$data["old"]["email"]);
+						$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.mailfilter';
+						if(is_file($file)) {
+							unlink($file)  or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
+							$app->log("Deleting custom Mailfiter".$file,LOGLEVEL_DEBUG);
+						}
+					}
 				}
 		}
 	}

--
Gitblit v1.9.1