View | Details | Raw Unified | Return to bug 39148
Collapse All | Expand All

(-)a/opac/opac-shelves.pl (-1 / +6 lines)
Lines 155-160 if ( $op eq 'add_form' ) { Link Here
155
        $op = $referer;
155
        $op = $referer;
156
        my $sortfield = $query->param('sortfield');
156
        my $sortfield = $query->param('sortfield');
157
        $sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded );
157
        $sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded );
158
        if ( $sortfield == 'copyrightdate' and C4::Context->preference('marcflavour') == 'UNIMARC' ) {
159
            $sortfield = 'publicationyear';
160
        }
158
        if ( $shelf->can_be_managed($loggedinuser) ) {
161
        if ( $shelf->can_be_managed($loggedinuser) ) {
159
            $shelf->shelfname( scalar $query->param('shelfname') );
162
            $shelf->shelfname( scalar $query->param('shelfname') );
160
            $shelf->sortfield($sortfield);
163
            $shelf->sortfield($sortfield);
Lines 328-333 if ( $op eq 'view' ) { Link Here
328
            $sortfield = 'title'
331
            $sortfield = 'title'
329
                if !$sortfield
332
                if !$sortfield
330
                or !grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded );
333
                or !grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded );
334
            if ( $sortfield == 'copyrightdate' and C4::Context->preference('marcflavour') == 'UNIMARC' ) {
335
                $sortfield = 'publicationyear';
336
            }
331
337
332
            my $rows;
338
            my $rows;
333
            if ( $query->param('print') or $query->param('rss') ) {
339
            if ( $query->param('print') or $query->param('rss') ) {
334
- 

Return to bug 39148