From: Michael M Slusarz Date: Mon, 30 Nov 2009 20:28:03 +0000 (-0700) Subject: Add config option to disable remote accounts X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cd6c8dd1fa0803c6d0db7bfe954748d04b5256c7;p=horde.git Add config option to disable remote accounts --- diff --git a/imp/config/conf.xml b/imp/config/conf.xml index 42aa742bf..b97e5cdb5 100644 --- a/imp/config/conf.xml +++ b/imp/config/conf.xml @@ -3,6 +3,8 @@ + false _("Additional Accounts"), - 'desc' => _("Configure additional mail accounts to display."), - 'members' => array('accountsmanagement') -); +if (!empty($GLOBALS['conf']['user']['allow_accounts'])) { + $prefGroups['accounts'] = array( + 'column' => _("General Options"), + 'label' => _("Additional Accounts"), + 'desc' => _("Configure additional mail accounts to display."), + 'members' => array('accountsmanagement') + ); +} $prefGroups['compose'] = array( 'column' => _("Message Options"), diff --git a/imp/filterprefs.php b/imp/filterprefs.php index 348a0aead..57bdad603 100644 --- a/imp/filterprefs.php +++ b/imp/filterprefs.php @@ -96,10 +96,13 @@ if (!$blacklist_link && !$whitelist_link && !$filters_link) { 'display' => array('g' => _("Apply filter rules whenever Inbox is displayed?"), 'p' => 'filter_on_display', 'h' => 'filter-on-display', 'l' => $display_locked), 'sidebar' => array('g' => _("Apply filter rules whenever sidebar is refreshed?"), 'p' => 'filter_on_sidebar', 'h' => 'filter-on-sidebar', 'l' => $sidebar_locked), 'any_mailbox' => array('g' => _("Allow filter rules to be applied in any mailbox?"), 'p' => 'filter_any_mailbox', 'h' => 'filter-any-mailbox', 'l' => $anymailbox_locked), - 'menuitem' => array('g' => _("Show the filter icon on the menubar?"), 'p' => 'filter_menuitem', 'l' => $menuitem_locked)); + 'menuitem' => array('g' => _("Show the filter icon on the menubar?"), 'p' => 'filter_menuitem', 'l' => $menuitem_locked) + ); + if ($_SESSION['imp']['protocol'] == 'pop') { unset($options_array['any_mailbox']); } + $opts = array(); foreach ($options_array as $key => $val) { if (!$val['l']) { diff --git a/imp/lib/Application.php b/imp/lib/Application.php index 8ba9af3c9..122b10e66 100644 --- a/imp/lib/Application.php +++ b/imp/lib/Application.php @@ -652,7 +652,7 @@ class IMP_Application extends Horde_Registry_Application case 'accountsmanagement': $GLOBALS['prefsui_no_save'] = true; - return true; + return !empty($GLOBALS['conf']['user']['allow_accounts']); default: return true;