- rewrite and simplify delete()
- also cleanup fetchmail, quota and quota2 tables
AliasHandler.php:
- update delete() to match the workflow in other classes
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1562 a1433add-5e2c-0410-b055-b7f2511e0802
# TODO: does db_rollback(); make sense? Not sure because mailbox_postdeletion was already called (move the call checking the db_delete result?)
# TODO: maybe mailbox_postdeletion should be run after all queries, just before commit/rollback
$error = 1;
# return false; # TODO: does this make sense? Or should we still cleanup vacation and vacation_notification?
}
db_log ($domain, 'delete_mailbox', $username);
} else {
$this->errormsg[] = "no mailbox $username"; # TODO: better message, make translatable
$error = 1;
}
$result = db_query("SELECT * FROM $table_vacation WHERE email = '$E_username' AND domain = '$E_domain'");
if($result['rows'] == 1) {
db_delete('vacation', 'email', $username);
db_delete('vacation_notification', 'on_vacation', $username); # TODO: delete vacation_notification independent of vacation? (in case of "forgotten" vacation_notification entries)
}
db_commit();
if ($error != 0) return false;
return true;
}
}
}
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */