Commit c719dc0b authored by tbrehm's avatar tbrehm

Fixed a warning in maildrop plugin.

parent 92e50958
...@@ -211,13 +211,17 @@ class maildrop_plugin { ...@@ -211,13 +211,17 @@ class maildrop_plugin {
unset($config_file_path); unset($config_file_path);
} else { } else {
// Delete the mailfilter recipe // Delete the mailfilter recipe
if(isset($data["old"]["email"])) {
$email_parts = explode("@",$data["old"]["email"]); $email_parts = explode("@",$data["old"]["email"]);
$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.mailfilter'; $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); if(is_file($file)) {
unlink($file) or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
$app->log("Deleting custom Mailfiter".$file,LOGLEVEL_DEBUG); $app->log("Deleting custom Mailfiter".$file,LOGLEVEL_DEBUG);
} }
} }
} }
}
}
function delete($event_name,$data) { function delete($event_name,$data) {
global $app, $conf; global $app, $conf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment