On 4/5/11 1:03 AM, Tomas Kuliavas wrote: > > Steve Giessler-2 wrote: >> On 4/4/11 4:19 PM, Tomas Kuliavas wrote: >>> Steve Giessler-2 wrote: >>>> Dear fellow Squirrelmail admins, >>>> >>>> I have SM 1.4.21 installed on Debian and after spending quite a bit of >>>> time searching all over for the answer I decided to post the question to >>>> this list. Whenever someone does a Search in SM, the Search Results >>>> window gives the results sorted by date in ASCENDING order (oldest to >>>> newest) but users would prefer these results to be sorted by date in >>>> DESCENDING order (newest to oldest). >>>> >>>> How can I make that happen without rewriting the .php code? Is there an >>>> option to change that or a plugin that will allow me to do that? I could >>>> not find it. BTW - server side sorting is enabled and I use the latest >>>> stable Exim and Dovecot IMAP with Maildir format if that matters (and >>>> PHP 5.2.16-0.dotdeb.0 with Suhosin-Patch 0.9.7) >>>> >>> SquirrelMail does not use SORT extension in search. Search results are >>> not >>> sorted. They are listed in the way IMAP server returns them and results >>> look >>> like sorted by arrival date. Newer arrivals get higher UIDs. >>> >>> Order can be reversed with one line of code in functions/imap_search.php. >>> Same function can be modified to use SORT extension. >>> >> Tomas, >> >> Any chance you or someone can tell me what that one line of code might be? >> > ---- > tomas@miri:/home/www/mail.topolis.inet/www/squirrelmail-1.4.21/functions$ > diff -u imap_search.php.orig imap_search.php > --- imap_search.php.orig 2011-04-05 07:56:27.000000000 +0300 > +++ imap_search.php 2011-04-05 07:56:48.000000000 +0300 > @@ -109,6 +109,8 @@ > } > $issent = ($mailbox == $sent_folder); > > + $id = array_reverse($id); > + > $msgs = fillMessageArray($imapConnection,$id,$cnt); > > return $msgs; > ----- > > functions/imap_search.php, near the end of file. + indicates added lines. Tomas, Thank you so much for your helped. That worked beautifully! Steve ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ----- squirrelmail-users mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx List archives: http://news.gmane.org/gmane.mail.squirrelmail.user List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users