diff --git a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php index 442a75b35a..c0eedce018 100644 --- a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php @@ -38,8 +38,9 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi $uicontacts = new addressbook_ui(); $selection = array(); - // Addressbook defines its own export limits - if($GLOBALS['egw_info']['server']['contact_export_limit'] == 'no' && !$GLOBALS['egw_info']['user']['apps']['admin']) { + // Addressbook defines its own export imits + $limit_exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0; + if($GLOBALS['egw_info']['server']['contact_export_limit'] == 'no' && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) { return; } @@ -64,7 +65,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi } $GLOBALS['egw_info']['flags']['currentapp'] = $old_app; - if($GLOBALS['egw_info']['server']['contact_export_limit'] && !$GLOBALS['egw_info']['user']['apps']['admin']) { + if($GLOBALS['egw_info']['server']['contact_export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) { $selection = array_slice($selection, 0, $GLOBALS['egw_info']['server']['contact_export_limit']); } if($options['explode_multiselects']) {