fixed link_query hook, it returned array('') instead of array() for nothing found

This commit is contained in:
Ralf Becker 2006-10-02 06:45:46 +00:00
parent b71ad4baed
commit f4e79928f6

View File

@ -727,9 +727,12 @@ class bocontacts extends socontacts
$criteria[$col] = $pattern;
}
}
foreach((array) parent::search($criteria,false,'org_name,n_family,n_given','','%',false,'OR') as $contact)
if (($contacts = parent::search($criteria,false,'org_name,n_family,n_given','','%',false,'OR')))
{
$result[$contact['id']] = $this->link_title($contact);
foreach($contacts as $contact)
{
$result[$contact['id']] = $this->link_title($contact);
}
}
return $result;
}