Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
fe9b73c3
Commit
fe9b73c3
authored
Nov 17, 2015
by
Marius Cramer
Browse files
Merge branch 'master' into 'master'
Master See merge request !244
parents
26e265ea
f562971d
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/lib/classes/cron.d/500-backup_mail.inc.php
View file @
fe9b73c3
...
...
@@ -198,14 +198,19 @@ class cronjob_backup_mail extends cronjob {
/* remove archives */
$mail_backup_dir
=
realpath
(
$backup_dir
.
'/mail'
.
$domain_rec
[
'domain_id'
]);
$mail_backup_file
=
'mail'
.
$rec
[
'mailuser_id'
]
.
'_
*
'
;
$mail_backup_file
=
'mail'
.
$rec
[
'mailuser_id'
]
.
'_'
;
if
(
is_dir
(
$mail_backup_dir
))
{
$dir_handle
=
opendir
(
$mail_backup_dir
.
'/'
);
while
(
$file
=
readdir
(
$dir_handle
))
{
if
(
!
is_dir
(
$file
))
{
unlink
(
"
$mail_backup_dir
/"
.
"
$file
"
);
if
(
substr
(
$file
,
0
,
strlen
(
$mail_backup_file
))
==
$mail_backup_file
)
{
unlink
(
$mail_backup_dir
.
'/'
.
$file
);
}
}
}
if
(
count
(
glob
(
$mail_backup_dir
.
"/*"
,
GLOB_NOSORT
))
===
0
)
{
rmdir
(
$mail_backup_dir
);
}
}
/* remove backups from db */
$sql
=
"DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment