From 06321ab94d45cf31da4a9027b11b86b85ca40a68 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 15 Mar 2011 19:51:39 +0000 Subject: [PATCH] If accounts are hidden from addressbook, don't export them if 'Use all' is selected --- .../inc/class.addressbook_export_contacts_csv.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php index 66394207e3..8ee854a7fd 100644 --- a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php @@ -53,7 +53,10 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi $uicontacts->get_rows($query,$selection,$readonlys, true); // only return the ids } elseif ( $options['selection'] == 'all_contacts' ) { - $selection = ExecMethod('addressbook.addressbook_bo.search',array()); + if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts']) { + $col_filter['account_id'] = null; + } + $selection = ExecMethod2('addressbook.addressbook_bo.search', array(), true, '', '','',false,'AND',false,$col_filter); //$uicontacts->get_rows($query,$selection,$readonlys,true); } else { $selection = explode(',',$options['selection']);