From 22426b6bd642dc687d5d3e36cde62b808aa62268 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 6 Jun 2011 16:41:17 +0000 Subject: [PATCH] If ordering contacts by a numeric field (last modified), apply letter filter to org name instead of ordered field --- addressbook/inc/class.addressbook_ui.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 0dff8e450b..c833be593d 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1232,7 +1232,8 @@ class addressbook_ui extends addressbook_bo } if ($query['searchletter']) // only show contacts if the order-criteria starts with the given letter { - $query['col_filter'][] = ($query['order'] == 'adr_one_postalcode' ? 'org_name' : (substr($query['order'],0,1)=='#'?'':'egw_addressbook.').$query['order']).' '. + $no_letter_search = array('adr_one_postalcode', 'adr_two_postalcode', 'contact_id', 'contact_created','contact_modified'); + $query['col_filter'][] = (in_array($query['order'],$no_letter_search) ? 'org_name' : (substr($query['order'],0,1)=='#'?'':'egw_addressbook.').$query['order']).' '. $GLOBALS['egw']->db->capabilities['case_insensitive_like'].' '.$GLOBALS['egw']->db->quote($query['searchletter'].'%'); } $wildcard = '%';