Bug 22445: Custom cover images - opac user (checkout list)
[srvgit] / opac / opac-shelves.pl
index ab1a835..802366d 100755 (executable)
@@ -235,7 +235,7 @@ if ( $op eq 'view' ) {
         if ( $shelf->can_be_viewed( $loggedinuser ) ) {
             $category = $shelf->category;
             my $sortfield = $query->param('sortfield') || $shelf->sortfield;    # Passed in sorting overrides default sorting
-            $sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber dateadded );
+            $sortfield = 'title' unless grep $_ eq $sortfield, qw( title author copyrightdate itemcallnumber dateadded );
             my $direction = $query->param('direction') || 'asc';
             $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc';
             my ( $page, $rows );
@@ -294,8 +294,7 @@ if ( $op eq 'view' ) {
                     $this_item->{description}       = $itemtype->description; #FIXME Should not it be translated_description?
                     $this_item->{notforloan}        = $itemtype->notforloan;
                 }
-                $this_item->{'coins'}           = GetCOinSBiblio($record);
-                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
+                $this_item->{'coins'}           = $biblio->get_coins;
                 $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
                 $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
                 $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
@@ -328,7 +327,8 @@ if ( $op eq 'view' ) {
                     $this_item->{incart} = 1;
                 }
 
-                $this_item->{biblionumber} = $biblionumber;
+                $this_item->{biblio_object} = $biblio;
+                $this_item->{biblionumber}  = $biblionumber;
                 push @items, $this_item;
             }