[Tickets #6090] sorting address book entries

bugs at horde.org bugs at horde.org
Mon Jan 7 22:18:23 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=6090
-----------------------------------------------------------------------
 Ticket             | 6090
 Created By         | brana at ualberta.ca
 Summary            | sorting address book entries
 Queue              | Turba
 Version            | 2.1.5
 Type               | Enhancement
 State              | New
 Priority           | 1. Low
 Milestone          | 
 Patch              | 
 Owners             | 
-----------------------------------------------------------------------


brana at ualberta.ca (2008-01-07 17:18) wrote:

hi, this is a problem we had about 6 months ago and with an upgrade to
2.1.5 the problem remains.

when a user has selected a name format of "lastname, firstname" in the
address book settings, a search of the address book or a simple listing of
the entries sorts the results according to last name as expected, but there
appears to be no secondary sort on the first name. so we get results as
follows:

Blow, Apple
Blow, Joe
Blow, Christine

can this be fixed to get results like:

Blow, Apple
Blow, Christine
Blow, Joe

note: we made some local customizations to files horde/turba/search.php
and horde/turba/lib/api.php which werent removed before upgrading to 2.1.5.
i'm not sure if these mods may have interfered with the upgrade, but the
code in both files right now is as follows:

------
$sortcolumn = ($prefs->getValue('sortby') == 0 ||
!isset($sort_columns[$prefs->getValue('sortby') - 1])) 
   ? (($prefs->getValue('name_format') == 'first_last')
      ? 'name'
      : 'lastname') 
   : $sort_columns[$prefs->getValue('sortby') - 1];
------

thanks.



More information about the bugs mailing list