From ea70ee73d88dd943ae97f3e1e3e1a48e3e5ecef9 Mon Sep 17 00:00:00 2001 From: Axel ROGER Date: Wed, 7 Nov 2012 14:08:05 +0000 Subject: [PATCH] Bugfix: can create catch-all on empty domain --- bureau/admin/mail_manage_catchall.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/bureau/admin/mail_manage_catchall.php b/bureau/admin/mail_manage_catchall.php index 5a45eb32..b6833d22 100644 --- a/bureau/admin/mail_manage_catchall.php +++ b/bureau/admin/mail_manage_catchall.php @@ -44,16 +44,13 @@ if (is_null($domain_id)) { if (!is_null($target_type)) { switch ($target_type) { case "none": - $mail->catchall_del($domain_id); - $error = _("Catchall successfully updated"); + $error=( ($mail->catchall_del($domain_id))?_("Catchall successfully deleted"):$err->errstr() ); break; case "domain": - $mail->catchall_set($domain_id, $target_domain); - $error = _("Catchall successfully updated"); + $error=( ($mail->catchall_set($domain_id, $target_domain))?_("Catchall successfully updated"):$err->errstr() ); break; case "mail": - $mail->catchall_set($domain_id, $target_mail); - $error = _("Catchall successfully updated"); + $error=( ($mail->catchall_set($domain_id, $target_mail))?_("Catchall successfully updated"):$err->errstr() ); break; default: $error=_("Unknown target type"); @@ -68,7 +65,7 @@ $catch=$mail->catchall_getinfos($domain_id);
$error

"; } @@ -95,7 +92,7 @@ __("You can choose what to do with emails sent to unexisting address of this dom

- + " />

@@ -111,7 +108,7 @@ __("You can choose what to do with emails sent to unexisting address of this dom

- + " />