f27deadf by Florian Schaal

fixed issue with php 5.3

1 parent aa7ed4da
......@@ -76,10 +76,11 @@ if($backup_dir != '') {
if(is_array($records)) {
foreach($records as $rec) { //* Do the mailbox backup
if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) {
$email = $rec['email'];
$email=explode("@",$email)[1];
$sql="SELECT * FROM mail_domain WHERE domain = '" . $app->db->quote($email)."'";
unset($email);
$temp = explode("@",$email);
$domain = $temp[1];
unset($temp);
$sql="SELECT * FROM mail_domain WHERE domain = '" . $app->db->quote($domain)."'";
$domain_rec=$app->db->queryOneRecord($sql);
$mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id'];
if(!is_dir($mail_backup_dir)) mkdir($mail_backup_dir, 0750);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!