Contact Sort Order Fix

Chris Delaney delaneyc@royaloakschools.com
Fri, 02 Mar 2001 14:39:02 -0500 (EST)


Hey Chuck,

Here is the fix we used to fix the sort order problem with upper and 
lower case letters.

Probably this is an example of something that should be configurable 
in an options file, but isn't yet (in this version of IMP?).

In $HORDEDIR/imp/lib/db.pgsql, around line 80, the following SQL is 
used to fill a user's contact list:

if (!($result = pg_Exec($db, "select address, nickname, fullname from
$default->db_address_table where username='$user@$server'"))) { return
false; }

I changed it to:

if (!($result = pg_Exec($db, "select address, nickname, fullname from
$default->db_address_table where username='$user@$server'
order by upper(nickname)"))) { return false; }

Changes are from:
Matt Benjamin President/CTO
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

Christopher Delaney
Royal Oak Neighborhood Schools
Network/Computer Administrator / District Webmaster