Skip to content

Commit

Permalink
Merge pull request #26 from GuillaumeFromage/master
Browse files Browse the repository at this point in the history
Delete wrapper on virtual mailman patch + cleanup code
  • Loading branch information
camlafit authored Mar 1, 2019
2 parents e6f95e8 + 0e00fc9 commit ebde2fa
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bureau/class/m_mailman.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,13 @@ function delete_lst($id) {
return false;
}


$db->query("UPDATE mailman SET mailman_action ='DELETE' WHERE id = ?", array( $id ));
$this->del_wrapper_all($login,$domain);

#If login and list are different, it means we are dealing with a virtual list, hence we have to remove its aliases when deleting it.
if("$login" != "$list"){
$this->del_wrapper_all($list,$domain);
$this->del_wrapper_all($list, $domain);
} else {
$this->del_wrapper_all($login,$domain);
}
return $login."@".$domain;
}
Expand All @@ -444,12 +444,12 @@ function del_wrapper_all($login,$domain){
if (!($dom_id = $dom->get_domain_byname($domain))) {
return false;
}

$this->del_wrapper($login,$dom_id); $this->del_wrapper($login."-request",$dom_id);
$this->del_wrapper($login."-owner",$dom_id); $this->del_wrapper($login."-admin",$dom_id);
$this->del_wrapper($login."-bounces",$dom_id); $this->del_wrapper($login."-confirm",$dom_id);
$this->del_wrapper($login."-join",$dom_id); $this->del_wrapper($login."-leave",$dom_id);
$this->del_wrapper($login."-subscribe",$dom_id); $this->del_wrapper($login."-unsubscribe",$dom_id);
$this->del_wrapper($login, $dom_id);
foreach ( ['request', 'owner', 'admin', 'bounces', 'confirm',
'join', 'leave', 'subscribe', 'unsubscribe'] as
$wrapper) {
$this->del_wrapper($login . '-' . $wrapper, $dom_id);
}

}

Expand Down

0 comments on commit ebde2fa

Please sign in to comment.