From faeeebdc557b122cdd42d8fe8dc6fd4665e9c9aa Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 23 Feb 2016 03:02:58 -0500
Subject: [PATCH] Hide DSN option in Preferences when smtp_server is not used (#1490666)

---
 CHANGELOG                       |    1 +
 program/steps/settings/func.inc |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index a4c2e15..44ada7c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,7 @@
 - Fix bug in long recipients list parsing for cases where recipient name contained @-char (#1490653)
 - Plugin API: Added addressbook_export hook
 - Fix additional_message_headers plugin compatibility with Mail_Mime >= 1.9 (#1490657)
+- Hide DSN option in Preferences when smtp_server is not used (#1490666)
 
 RELEASE 1.2-beta
 ----------------
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 93e780b..087b70b 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -749,7 +749,7 @@
                 );
             }
 
-            if (!isset($no_override['dsn_default'])) {
+            if (!isset($no_override['dsn_default']) && $RCMAIL->config->get('smtp_server')) {
                 if (!$current) {
                     continue 2;
                 }

--
Gitblit v1.9.1