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

(-)a/C4/Auth.pm (-3 / +2 lines)
Lines 381-387 sub get_template_and_user { Link Here
381
        my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'};
381
        my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'};
382
        my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'};
382
        my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'};
383
        my $opac_name = '';
383
        my $opac_name = '';
384
        if (($opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || $in->{'query'}->param('limit') =~ /branch:(\w+)/){
384
        if (($opac_search_limit && $opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || ($in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:(\w+)/)){
385
            $opac_name = $1;   # opac_search_limit is a branch, so we use it.
385
            $opac_name = $1;   # opac_search_limit is a branch, so we use it.
386
        } elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) {
386
        } elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) {
387
            $opac_name = C4::Context->userenv->{'branch'};
387
            $opac_name = C4::Context->userenv->{'branch'};
Lines 707-713 sub checkauth { Link Here
707
        else {
707
        else {
708
            $cookie = $query->cookie( CGISESSID => $session->id );
708
            $cookie = $query->cookie( CGISESSID => $session->id );
709
            $session->param('lasttime',time());
709
            $session->param('lasttime',time());
710
            unless ( $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
710
            unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
711
                $flags = haspermission($userid, $flagsrequired);
711
                $flags = haspermission($userid, $flagsrequired);
712
                if ($flags) {
712
                if ($flags) {
713
                    $loggedin = 1;
713
                    $loggedin = 1;
714
- 

Return to bug 8804