[Koha-patches] [PATCH] Made changes to add sorting on the catalouging screen in the intranet section.

Mason James mason.loves.sushi at gmail.com
Thu Jul 2 09:37:12 CEST 2009



>
> The search.pl uses 'getRecords' function to get the records, store  
> it and pas it to the templates.
> The addbooks.pl uses 'SimpleSearch' function to get the records,  
> store it and pass it to the templates.
>
> SimpleSearch has 'offset' as its parameter, but it is only used for  
> pagination function. and cannot be used for sorting the result set.
>
>
> hiya Satyanarayana
>
> i too recently made a sorting change to addbooks.pl
> by simply giving SimpleSearch() a better query.
>
>
> +    my $ti_query =  qq|ti,rt,wrdl,r3="$query"|;
> +    my ( $error, $marcresults, $total_hits ) = SimpleSearch 
> ($ti_query, $results_per_page * ($page - 1), $results_per_page);
>
>
> this cleaner method is adequate for your addbooks.pl sorting needs,  
> surely?




On 2009/07/2, at 7:14 PM, satyanarayana holenarsipur wrote:

>
> Will this change also help in all kinds of sorting, as i want  
> sorting by title, relavance, popularity, call number, author



yes, i think so



More information about the Koha-patches mailing list