if ( $shelf ) {
$op = $referer;
my $sortfield = $query->param('sortfield');
- $sortfield = 'title' unless grep {/^$sortfield$/}qw( title author copyrightdate itemcallnumber dateadded );
+ $sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded );
if ( $shelf->can_be_managed( $loggedinuser ) ) {
$shelf->shelfname( scalar $query->param('shelfname') );
$shelf->sortfield( $sortfield );
if ( $shelf ) {
if ( $shelf->can_be_viewed( $loggedinuser ) ) {
my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title'; # 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 ( $rows, $page );
$itemtype = Koha::ItemTypes->find( $itemtype );
my $biblio = Koha::Biblios->find( $content->biblionumber );
$this_item->{title} = $biblio->title;
+ $this_item->{subtitle} = $biblio->subtitle;
+ $this_item->{medium} = $biblio->medium;
+ $this_item->{part_number} = $biblio->part_number;
+ $this_item->{part_name} = $biblio->part_name;
$this_item->{author} = $biblio->author;
$this_item->{dateadded} = $content->dateadded;
$this_item->{imageurl} = $itemtype ? C4::Koha::getitemtypeimagelocation( 'intranet', $itemtype->imageurl ) : q{};
$this_item->{description} = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ?
$this_item->{notforloan} = $itemtype->notforloan if $itemtype;
- $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 );