diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index 89006a4ca5..67116fa5f0 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -150,6 +150,15 @@ class addressbook_hooks 'admin' => false, 'default'=> '0' ); + $settings['hide_groups_as_lists'] = array( + 'type' => 'check', + 'label' => 'Hide user groups as distribution lists', + 'name' => 'hide_groups_as_lists', + 'help' => 'User groups are automatically shown as distribution lists.', + 'xmlrpc' => False, + 'admin' => false, + 'default'=> '0' + ); $contacts = new Api\Contacts(); $fileas_options = $contacts->fileas_options(); foreach(Api\Contacts\Storage::$duplicate_fields as $key => $label) diff --git a/addressbook/lang/egw_en.lang b/addressbook/lang/egw_en.lang index b6a92e151e..32e105a9e8 100644 --- a/addressbook/lang/egw_en.lang +++ b/addressbook/lang/egw_en.lang @@ -275,6 +275,7 @@ group %1 addressbook en Group %1 h addressbook en h hide accounts from addressbook addressbook en Hide user accounts hide all accounts addressbook en Hide all accounts +hide user groups as distribution lists addressbook en Hide user groups as distribution lists hides accounts completly from the adressbook. addressbook en Hide user accounts completely from the address book. history logging admin en History logging home address addressbook en Home address @@ -507,6 +508,7 @@ use country list addressbook en Use country list use setup for a full account-migration admin en Use setup for a full account migration use this tag for addresslabels. put the content, you want to repeat, between two tags. addressbook en Use this tag for address labels. Place the content you want to repeat between two tags. used for links and for the own sorting of the list addressbook en Used for links and for the own sorting of the list +user groups are automatically shown as distribution lists. addressbook en User groups are automatically shown as distribution lists. user preference addressbook en User preference vcard common en vCard vcards require a first name entry. addressbook en vCards require a first name entry. diff --git a/api/src/Contacts/Storage.php b/api/src/Contacts/Storage.php index 0522c104f2..78c7ba8a32 100755 --- a/api/src/Contacts/Storage.php +++ b/api/src/Contacts/Storage.php @@ -1164,8 +1164,10 @@ class Storage } } - // add groups for all backends, if accounts addressbook is not hidden - if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts'] !== '1') + // add groups for all backends, if accounts addressbook is not hidden & + // preference has not turned them off + if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts'] !== '1' && + $GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_groups_as_lists'] == '0') { foreach($GLOBALS['egw']->accounts->search(array( 'type' => 'groups'