mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Making virtualmaidel.php remove Sieve filters if they exist
This commit is contained in:
parent
b64e202508
commit
d986e26be8
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
2017.08.31 updated to use PHP mysqli extension.
|
2017.08.31 updated to use PHP mysqli extension.
|
||||||
|
2018.02.23 removing Sieve filters if exists.
|
||||||
Tadas Ustinavičius <tadas at ring dot lt> ( https://github.com/postfixadmin/postfixadmin/pull/70 )
|
Tadas Ustinavičius <tadas at ring dot lt> ( https://github.com/postfixadmin/postfixadmin/pull/70 )
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -165,10 +166,20 @@ if (is_array($dir)) {
|
|||||||
foreach ($value as $user => $value2) {
|
foreach ($value as $user => $value2) {
|
||||||
// Nuke.. need any more explanations?
|
// Nuke.. need any more explanations?
|
||||||
$path = $homedir . '/' . $key . '/' . $user;
|
$path = $homedir . '/' . $key . '/' . $user;
|
||||||
|
$sieve_path = $homedir . '/.sieve/' . $key . '/' . $user;
|
||||||
|
$sieve_exists = false;
|
||||||
|
// check if user has Sieve filters created
|
||||||
|
if (file_exists($sieve_path)) {
|
||||||
|
$sieve_exists = true;
|
||||||
|
}
|
||||||
if ($MAKE_CHANGES) {
|
if ($MAKE_CHANGES) {
|
||||||
deldir($path);
|
deldir($path);
|
||||||
|
deldir($sieve_path);
|
||||||
} else {
|
} else {
|
||||||
echo " - Would recursively delete : $path \n";
|
echo " - Would recursively delete : $path \n";
|
||||||
|
if ($sieve_exists) {
|
||||||
|
echo " - Would recursively delete Sieve filters : $sieve_path \n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user