From 2372949162e3c34b47e0cc2b478d5f13c0ed8b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Mon, 6 Nov 2017 21:58:08 +0100 Subject: [PATCH] [Web] Fix check for existing domain when adding alias domains --- data/web/inc/functions.mailbox.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 2ca86e81..654f8972 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -654,13 +654,13 @@ function mailbox($_action, $_type, $_data = null, $attr = null) { } $stmt = $pdo->prepare("SELECT `alias_domain` FROM `alias_domain` WHERE `alias_domain`= :alias_domain UNION - SELECT `alias_domain` FROM `alias_domain` WHERE `alias_domain`= :alias_domain_in_domain"); + SELECT `domain` FROM `domain` WHERE `domain`= :alias_domain_in_domain"); $stmt->execute(array(':alias_domain' => $alias_domain, ':alias_domain_in_domain' => $alias_domain)); $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); if ($num_results != 0) { $_SESSION['return'] = array( 'type' => 'danger', - 'msg' => sprintf($lang['danger']['aliasd_exists']) + 'msg' => sprintf($lang['danger']['alias_domain_invalid']) ); return false; }