Lines 234-240
if ( $op eq 'view' ) {
Link Here
|
234 |
if ( $shelf ) { |
234 |
if ( $shelf ) { |
235 |
if ( $shelf->can_be_viewed( $loggedinuser ) ) { |
235 |
if ( $shelf->can_be_viewed( $loggedinuser ) ) { |
236 |
my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title'; # Passed in sorting overrides default sorting |
236 |
my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title'; # Passed in sorting overrides default sorting |
237 |
$sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber dateadded ); |
237 |
$sortfield = 'title' unless grep $_ eq $sortfield, qw( title author copyrightdate itemcallnumber dateadded ); |
238 |
my $direction = $query->param('direction') || 'asc'; |
238 |
my $direction = $query->param('direction') || 'asc'; |
239 |
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; |
239 |
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; |
240 |
my ( $rows, $page ); |
240 |
my ( $rows, $page ); |
241 |
- |
|
|