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

(-)a/C4/Auth.pm (-5 / +9 lines)
Lines 371-380 sub get_template_and_user { Link Here
371
        my $LibraryNameTitle = C4::Context->preference("LibraryName");
371
        my $LibraryNameTitle = C4::Context->preference("LibraryName");
372
        $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
372
        $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
373
        $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
373
        $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
374
        # clean up the busc param in the session if the page is not opac-detail
374
        # clean up the busc param in the session if the page is not opac-detail and not the "add to list" page
375
        if (C4::Context->preference("OpacBrowseResults") && $in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) {
375
        if (   C4::Context->preference("OpacBrowseResults")
376
            my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID"));
376
            && $in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ ) {
377
            $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc"));
377
            my $pagename = $1;
378
            unless (   $pagename =~ /^(?:MARC|ISBD)?detail$/
379
                    or $pagename =~ /^addbybiblionumber$/ ) {
380
                my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID"));
381
                $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc"));
382
            }
378
        }
383
        }
379
        # variables passed from CGI: opac_css_override and opac_search_limits.
384
        # variables passed from CGI: opac_css_override and opac_search_limits.
380
        my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'};
385
        my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'};
381
- 

Return to bug 11132