Skip to content

Commit fd3b731

Browse files
author
floria030
committed
match PHP Strict Standards
1 parent 64b2a9c commit fd3b731

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server/lib/classes/cron.d/500-backup_mail.inc.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,15 @@ public function onRunJob() {
9595
$domain_dir=explode('/',$rec['maildir']);
9696
$_temp=array_pop($domain_dir);unset($_temp);
9797
$domain_dir=implode('/',$domain_dir);
98-
99-
$source_dir=array_pop(explode('/',$rec['maildir']));
98+
99+
$parts=explode('/',$rec['maildir']);
100+
$source_dir=array_pop($parts);
101+
unset($parts);
100102

101103
//* create archives
102104
if($backup_mode == 'userzip') {
103105
$mail_backup_file.='.zip';
104-
exec('cd '.$rec['homedir'].' && zip -b /tmp -r '.$mail_backup_dir.'/'.$mail_backup_file.' '.$source_dir.' > /dev/nul');
106+
exec('cd '.$domain_dir.' && zip '.$mail_backup_dir.'/'.$mail_backup_file.' -b /tmp -r '.$source_dir.' > /dev/nul', $tmp_output, $retval);
105107
} else {
106108
/* Create a tar.gz backup */
107109
$mail_backup_file.='.tar.gz';

0 commit comments

Comments
 (0)