From a54d7b34e753c2902c37fa93990dd9ffda7b4b44 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 21 Jun 2011 13:11:27 +0000 Subject: [PATCH] * eMail: regard addressbook preference to hide accounts or not in ajax search for emailadresses while composing messages --- felamimail/inc/class.ajax_contacts.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/felamimail/inc/class.ajax_contacts.inc.php b/felamimail/inc/class.ajax_contacts.inc.php index 118c2473ab..a8f6e956aa 100644 --- a/felamimail/inc/class.ajax_contacts.inc.php +++ b/felamimail/inc/class.ajax_contacts.inc.php @@ -30,8 +30,11 @@ 'email_home' => $_searchString, ),array('n_fn','email','email_home'),'n_fn','','%',false,'OR',array(0,20)); + $showAccounts = true; + if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts']) $showAccounts=false; // additionally search the accounts, if the contact storage is not the account storage - if ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap' && + if ($showAccounts && + $GLOBALS['egw_info']['server']['account_repository'] == 'ldap' && $GLOBALS['egw_info']['server']['contact_repository'] == 'sql') { $accounts = $GLOBALS['egw']->contacts->search(array(