fix routing for vmail mapping

This commit is contained in:
Matthew Saunders Brown 2023-03-30 10:15:35 -07:00
parent 2c891ac180
commit c1a98c5ff6
2 changed files with 12 additions and 2 deletions

View File

@ -48,7 +48,12 @@ class AliasesAdd extends \Panel\Vmail {
if ($result_code == 0) { if ($result_code == 0) {
$messages[] = "Success: Email alias $alias@$domain added."; $messages[] = "Success: Email alias $alias@$domain added.";
$f3->set('SESSION.messages', $messages); $f3->set('SESSION.messages', $messages);
$mapping = $f3->get('NAV.mapping');
if ($mapping == 'vmail') {
$f3->reroute("/Accounts/$mbox/Aliases");
} else {
$f3->reroute("/Email/$domain/Accounts/$mbox/Aliases"); $f3->reroute("/Email/$domain/Accounts/$mbox/Aliases");
}
} else { } else {
/* failure, set error messages */ /* failure, set error messages */
if (count($output) > 0) { if (count($output) > 0) {

View File

@ -42,7 +42,12 @@ class AliasesDelete extends \Panel\Vmail {
$messages[] = "Error deleting alias '$alias@$domain'."; $messages[] = "Error deleting alias '$alias@$domain'.";
} }
$f3->set('SESSION.messages', $messages); $f3->set('SESSION.messages', $messages);
$mapping = $f3->get('NAV.mapping');
if ($mapping == 'vmail') {
$f3->reroute("/Aliases");
} else {
$f3->reroute("/Email/$domain/Aliases"); $f3->reroute("/Email/$domain/Aliases");
}
} }