[turba] Sort AddressBook

Parag Godkar paragg@konark.ncst.ernet.in
Tue, 23 Jul 2002 19:00:39 +0530


Following is the mail from the IMP mailing list
archives from Mr. Eduardo Pinto
<eep@poingg.com> dated 24-6-2002 which
shows how to sort the address book by name 
as well as the addresses when accessed from 
the compose window -

Quoting Mr. Eduardo Pinto -
"So... For those using horde+imp+turba, try this if you want your contacts
sorted by name, rather than lastname

=======================
turba/lib/Source.php, line 179
=======================
change:
function search($search_criteria, $sort_criteria = 'lastname', $match =
null)
to:
function search($search_criteria, $sort_criteria = 'name', $match = null)

=======================
turba/lib/List.php
=======================
change:
function sort($sort = 'lastname', $low = null, $high = null)
to:
function sort($sort = 'name', $low = null, $high = null)

=======================
turba/lib/api.php
=======================
change:
$res = $driver->search($criteria, 'lastname', TURBA_SEARCH_OR);
to:
$res = $driver->search($criteria, 'name', TURBA_SEARCH_OR);
"

Regards,
Parag Godkar


----- Original Message ----- 
From: "Alessandro Castro de Almeida" <acalmeida@cariocaengenharia.com.br>
To: <turba@lists.horde.org>
Sent: Tuesday, July 23, 2002 6:41 PM
Subject: [turba] Sort AddressBook


> Hello!
> 
> I need your help.
> I have to order the result of AddressBook in compose window.
> 
> I've changed the following code in file /horde/turba/lib/Driver/sql.php
>   
>       $query  = 'SELECT ' . implode(', ', $fields) . ' ';
>       $query .= 'FROM ' . $this->table;
>       $query .= $where;
>     
>       $query .= ' ORDER BY object_name';
> 
> Is there correct?? It doesn't work...
> 
> Thanks
> 
>  Alessandro
> 
> 
> -- 
> Turba mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: turba-unsubscribe@lists.horde.org
>