Fixed Patron Search Results
authorKyle M Hall <kyle.m.hall@gmail.com>
Tue, 4 May 2010 16:33:46 +0000 (16:33 +0000)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 5 May 2010 12:57:04 +0000 (08:57 -0400)
By default, the patron search was pulling results in *Descending* order,
then reordering the results on the page using javascript in *Ascending* order.

This was causing screwy results where the entire list of results of multiple
pages was not in complete alphabetical order.

Fixed by changing the SQL to pull in Ascending order.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
members/member.pl

index 700f200..58485b6 100755 (executable)
@@ -80,7 +80,7 @@ if ($orderbyparams){
        push @orderby, {$orderbyelt[0]=>$orderbyelt[1]||0};
 }
 else {
-       @orderby = ({firstname=>1},{surname=>1});
+       @orderby = ({surname=>0},{firstname=>0});
 }
 
 $member =~ s/,//g;   #remove any commas from search string