From 2444cd1cd24a5480b606f9ead735f474764243ea Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Sun, 7 May 2017 20:12:24 +0200 Subject: [PATCH] Remove duplicated SQL --- data/web/inc/functions.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index 97a06b8d..1c0504f6 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -5134,11 +5134,7 @@ function add_forwarding_host($postarray) { if ($source == $host) $source = ''; try { - if ($filter_spam) { // if the host already exists, REPLACE it with the spam filter turned on - $stmt = $pdo->prepare("REPLACE INTO `forwarding_hosts` (`host`, `source`, `filter_spam`) VALUES (:host, :source, :filter_spam)"); - } else { // if the host already exists, IGNORE it no matter whether the spam filter is already turned on - $stmt = $pdo->prepare("INSERT IGNORE INTO `forwarding_hosts` (`host`, `source`, `filter_spam`) VALUES (:host, :source, :filter_spam)"); - } + $stmt = $pdo->prepare("REPLACE INTO `forwarding_hosts` (`host`, `source`, `filter_spam`) VALUES (:host, :source, :filter_spam)"); $stmt->execute(array( ':host' => $host, ':source' => $source,