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

(-)a/C4/Auth.pm (-14 / +19 lines)
Lines 30-36 use C4::Templates; # to get the template Link Here
30
use C4::Languages;
30
use C4::Languages;
31
use C4::Branch;       # GetBranches
31
use C4::Branch;       # GetBranches
32
use C4::Search::History;
32
use C4::Search::History;
33
use C4::VirtualShelves;
34
use Koha::AuthUtils qw(hash_password);
33
use Koha::AuthUtils qw(hash_password);
35
use POSIX qw/strftime/;
34
use POSIX qw/strftime/;
36
use List::MoreUtils qw/ any /;
35
use List::MoreUtils qw/ any /;
Lines 199-211 sub get_template_and_user { Link Here
199
        $template->param( loggedinusernumber => $borrowernumber );
198
        $template->param( loggedinusernumber => $borrowernumber );
200
        $template->param( sessionID          => $sessionID );
199
        $template->param( sessionID          => $sessionID );
201
200
202
        my ( $total, $pubshelves, $barshelves ) = C4::VirtualShelves::GetSomeShelfNames( $borrowernumber, 'MASTHEAD' );
201
        if ( $in->{'type'} eq 'opac' ) {
203
        $template->param(
202
            require C4::VirtualShelves;
204
            pubshelves     => $total->{pubtotal},
203
            my ( $total, $pubshelves, $barshelves ) = C4::VirtualShelves::GetSomeShelfNames( $borrowernumber, 'MASTHEAD' );
205
            pubshelvesloop => $pubshelves,
204
            $template->param(
206
            barshelves     => $total->{bartotal},
205
                pubshelves     => $total->{pubtotal},
207
            barshelvesloop => $barshelves,
206
                pubshelvesloop => $pubshelves,
208
        );
207
                barshelves     => $total->{bartotal},
208
                barshelvesloop => $barshelves,
209
            );
210
        }
209
211
210
        my ($borr) = C4::Members::GetMemberDetails($borrowernumber);
212
        my ($borr) = C4::Members::GetMemberDetails($borrowernumber);
211
        my @bordat;
213
        my @bordat;
Lines 334-344 sub get_template_and_user { Link Here
334
336
335
        $template->param( sessionID => $sessionID );
337
        $template->param( sessionID => $sessionID );
336
338
337
        my ( $total, $pubshelves ) = C4::VirtualShelves::GetSomeShelfNames( undef, 'MASTHEAD' );
339
        if ( $in->{'type'} eq 'opac' ){
338
        $template->param(
340
            require C4::VirtualShelves;
339
            pubshelves     => $total->{pubtotal},
341
            my ( $total, $pubshelves ) = C4::VirtualShelves::GetSomeShelfNames( undef, 'MASTHEAD' );
340
            pubshelvesloop => $pubshelves,
342
            $template->param(
341
        );
343
                pubshelves     => $total->{pubtotal},
344
                pubshelvesloop => $pubshelves,
345
            );
346
        }
342
    }
347
    }
343
348
344
    # Anonymous opac search history
349
    # Anonymous opac search history
Lines 1203-1208 sub checkauth { Link Here
1203
    $template->param( loginprompt => 1 ) unless $info{'nopermission'};
1208
    $template->param( loginprompt => 1 ) unless $info{'nopermission'};
1204
1209
1205
    if ( $type eq 'opac' ) {
1210
    if ( $type eq 'opac' ) {
1211
        require C4::VirtualShelves;
1206
        my ( $total, $pubshelves ) = C4::VirtualShelves::GetSomeShelfNames( undef, 'MASTHEAD' );
1212
        my ( $total, $pubshelves ) = C4::VirtualShelves::GetSomeShelfNames( undef, 'MASTHEAD' );
1207
        $template->param(
1213
        $template->param(
1208
            pubshelves     => $total->{pubtotal},
1214
            pubshelves     => $total->{pubtotal},
1209
- 

Return to bug 13852