From 6d36d46e9036f991a80b7b92b20e4e43471b10d9 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 7 Apr 2008 10:02:01 +0000 Subject: [PATCH] another bug: if we dont order by cf's we dont need to extend the customfields by its tablename --- addressbook/inc/class.socontacts_sql.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.socontacts_sql.inc.php b/addressbook/inc/class.socontacts_sql.inc.php index c10d01f7f5..26318898a9 100644 --- a/addressbook/inc/class.socontacts_sql.inc.php +++ b/addressbook/inc/class.socontacts_sql.inc.php @@ -308,8 +308,11 @@ class socontacts_sql extends so_sql } elseif($col == 'contact_value') { - $criteria =array_merge($criteria,array('extra_order.contact_value'=>$val)); - unset($criteria[$col]); + if ($order_by[0] == '#') + { + $criteria =array_merge($criteria,array('extra_order.contact_value'=>$val)); + unset($criteria[$col]); + } } } }