* Addressbook: fix for postgres error on advanced search in addressbook (Helpdesk 3421)

This commit is contained in:
Klaus Leithoff 2012-06-01 13:00:32 +00:00
parent 6c3213e284
commit 47642bf6fe

View File

@ -345,7 +345,7 @@ class addressbook_sql extends so_sql_cf
$join .= self::ACCOUNT_ACTIVE_JOIN; $join .= self::ACCOUNT_ACTIVE_JOIN;
$filter[] = str_replace('UNIX_TIMESTAMP(NOW())',time(),self::ACOUNT_ACTIVE_FILTER); $filter[] = str_replace('UNIX_TIMESTAMP(NOW())',time(),self::ACOUNT_ACTIVE_FILTER);
} }
if ($join || $criteria && is_string($criteria)) // search also adds a join for custom fields! if ($join || ($criteria && is_string($criteria)) || ($criteria && is_array($criteria) && $order_by)) // search also adds a join for custom fields!
{ {
switch(gettype($only_keys)) switch(gettype($only_keys))
{ {