From 78143cb9c65de5de4ae0854d13a86ccbec8635ea Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 26 Oct 2009 11:47:23 +0000 Subject: [PATCH] "fixed backend detection to recognice $contact_id = array('account_id' => 123) as account" --- addressbook/inc/class.addressbook_so.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_so.inc.php b/addressbook/inc/class.addressbook_so.inc.php index 6490fb3fb6..2947d61000 100755 --- a/addressbook/inc/class.addressbook_so.inc.php +++ b/addressbook/inc/class.addressbook_so.inc.php @@ -750,12 +750,12 @@ class addressbook_so * @param int $owner=null account_id of owner or 0 for accounts * @return object */ - function &get_backend($contact_id=null,$owner=null) + function get_backend($contact_id=null,$owner=null) { if ($owner === '') $owner = null; if ($this->contact_repository != $this->account_repository && is_object($this->so_accounts) && - (!is_null($owner) && !$owner || !is_null($contact_id) && + (!is_null($owner) && !$owner || is_array($contact_id) && $contact_id['account_id'] || !is_null($contact_id) && ($this->contact_repository == 'sql' && (!is_numeric($contact_id) && !is_array($contact_id) )|| $this->contact_repository == 'ldap' && is_numeric($contact_id)))) {