-my $sort = $query->param('order') || "aqorders.ordernumber";
-
-my @sort_loop;
-if (defined $sort) {
- foreach (split /\,/, $sort) {
- my %sorthash = (
- string => $_,
- );
- # other possibly valid tables for later: aqbookfund biblio biblioitems
- if (
- (/^\s*(biblioitems)\.(\w+)\s*$/ and $2 eq 'publishercode') or
- (/^\s*(aqorders)\.(\w+)\s*$/ and $2 eq 'ordernumber' )
- ) {
- $sorthash{table} = $1;
- $sorthash{field} = $2;
- } else {
- $sorthash{error} = 1;
- }
- push @sort_loop, \%sorthash;
- }
-}