> -(scalar @$results) and $template->param(TAGLOOP => $results);
> +my @orderedresult = sort { $a->{'term'} cmp $b->{'term'} } @$results;
> +(scalar @$results) and $template->param(TAGLOOP => \...@orderedresult );
>
>
You shouldn't have to resort the results in the script when you can just
give the right argument to get_approval_rows($arghash), like:
- my $arghash = {approved=>1, limit=>$limit, 'sort'=>'-weight_total'};
+ my $arghash = {approved=>1, limit=>$limit, 'sort'=>'+term'};
Then it will get down the SQL level where the sorting is most efficient.
--
Joe Atzberger
LibLime - Open Source Library Solutions
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches