Florian Schaal
2014-10-24 bdf99f4160bd537cf815eb687c3e062c450d029e
fixed issue with php 5.3
2 files modified
18 ■■■■ changed files
interface/web/tools/resync_do.php 14 ●●●● patch | view | raw | blame | history
server/lib/classes/cron.d/500-backup_mail.inc.php 4 ●●● patch | view | raw | blame | history
interface/web/tools/resync_do.php
@@ -67,7 +67,9 @@
                    $server_name[$server['server_id']] = $server['server_name'];
                }
            } else {
                $server_name[$server_id] = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$server_id)['server_name'];
                $temp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$server_id);
                $server_name[$server_id] = $temp['server_name'];
                unset($temp)
            }
                
            if ( isset($tmp_id) ) $server_id = rtrim($tmp_id,',');
@@ -283,7 +285,15 @@
            $msg .= '<b>Resynced DNS zone</b><br>';
            if(is_array($zone_records) && !empty($zone_records)) {
                foreach($zone_records as $zone_rec) {
                    if ($server_id == -1) $records = query_server('dns_rr', $server_id, $server_type, 'WHERE 1', false)[0]; else $records = query_server('dns_rr', $server_id, $server_type, "WHERE active = 'Y'")[0];
                    if ($server_id == -1) {
                        $temp = query_server('dns_rr', $server_id, $server_type, 'WHERE 1', false);
                        $records = $temp[0];
                        unset($temp);
                    } else {
                        $temp= query_server('dns_rr', $server_id, $server_type, "WHERE active = 'Y'");
                        $records = $temp[0];
                        unset($temp);
                    }
                    $rr_count = 0;
                    if (is_array($records)) {
                        foreach($records as $rec) {
server/lib/classes/cron.d/500-backup_mail.inc.php
@@ -83,7 +83,9 @@
                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')) {
                        $sql = "SELECT * FROM mail_domain WHERE domain = '".$app->db->quote(explode("@",$rec['email'])[1])."'";
                        $email = $rec['email'][1];
                        $sql="SELECT * FROM mail_domain WHERE domain = ?" . $app->db->quote(explode("@",$email))."'";
                        unset($email);
                        $domain_rec=$app->db->queryOneRecord($sql);
                        $mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id'];