From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Fri, 22 Apr 2016 05:26:17 -0400 Subject: [PATCH] Added PHP 7 check in installer and updater. --- server/plugins-available/maildeliver_plugin.inc.php | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index 08a4998..c8fc069 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -120,9 +120,17 @@ $tpl->newTemplate($filter_file_template); // cc Field + $tmp_mails_arr = explode(',',$data["new"]["cc"]); + $tmp_addresses_arr = array(); + foreach($tmp_mails_arr as $address) { + if(trim($address) != '') $tmp_addresses_arr[] = array('address' => trim($address)); + } + $tpl->setVar('cc', $data["new"]["cc"]); + $tpl->setLoop('ccloop', $tmp_addresses_arr); // Custom filters + if($data["new"]["custom_mailfilter"] == 'NULL') $data["new"]["custom_mailfilter"] = ''; $tpl->setVar('custom_mailfilter', $data["new"]["custom_mailfilter"]); // Move junk @@ -205,6 +213,7 @@ $tpl->setVar('addresses', $address_str); file_put_contents($sieve_file, $tpl->grab()); + exec('chown '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($sieve_file)); unset($tpl); -- Gitblit v1.9.1