diff --git a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php index c0eedce018..58543cf341 100644 --- a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php @@ -39,7 +39,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi $selection = array(); // 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; + $limit_exception = bo_merge::is_export_limit_excepted(); if($GLOBALS['egw_info']['server']['contact_export_limit'] == 'no' && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) { return; } diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index a0a747c626..3f3a486e17 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -569,7 +569,7 @@ class addressbook_ui extends addressbook_bo } // check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no) - $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; + $exception = bo_merge::is_export_limit_excepted(); if ((isset($GLOBALS['egw_info']['user']['apps']['admin']) || $exception) || !$this->config['contact_export_limit'] || (int)$this->config['contact_export_limit']) { $actions['export'] = array(