From 90dbfd6a37a6745157a501f0a8b2e13f71a64ddd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 10 Oct 2008 10:55:52 +0000 Subject: [PATCH] "addressbook part of Regis patch" --- addressbook/inc/class.addressbook_bo.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_bo.inc.php b/addressbook/inc/class.addressbook_bo.inc.php index 24dddc9e7b..d92c1987fb 100755 --- a/addressbook/inc/class.addressbook_bo.inc.php +++ b/addressbook/inc/class.addressbook_bo.inc.php @@ -882,7 +882,7 @@ class addressbook_bo extends addressbook_so * * Is called as hook to participate in the linking * - * @param string $pattern pattern to search + * @param string|array $pattern pattern to search, or an array with a 'search' key * @return array with id - title pairs of the matching entries */ function link_query($pattern) @@ -892,7 +892,7 @@ class addressbook_bo extends addressbook_so { foreach($this->columns_to_search as $col) { - $criteria[$col] = $pattern; + $criteria[$col] = is_array($pattern) ? $pattern['search'] : $pattern; } } if (($contacts = parent::search($criteria,false,'org_name,n_family,n_given,cat_id','','%',false,'OR')))