Bugzilla – Attachment 22455 Details for
Bug 11132
The results list is reset on adding a biblio to a list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11132: The results list is reset on adding a biblio to a list
PASSED-QA-Bug-11132-The-results-list-is-reset-on-a.patch (text/plain), 2.50 KB, created by
Katrin Fischer
on 2013-10-27 19:06:00 UTC
(
hide
)
Description:
[PASSED QA] Bug 11132: The results list is reset on adding a biblio to a list
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-10-27 19:06:00 UTC
Size:
2.50 KB
patch
obsolete
>From f516acec915ab3700c2f2fd9a2ca2e6a94781c6a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 24 Oct 2013 17:06:08 +0200 >Subject: [PATCH] [PASSED QA] Bug 11132: The results list is reset on adding a > biblio to a list > >A "busc" param is cleared if the template name is not opac-.*detail.tt. >So if a user adds a biblio to a list, he cannot continue to browse >results. > >Test plan: >- launch a search at the OPAC (opac-search.pl). >- click on a result and browse results (using previous/next links). >- a title attract your attention and you add it to a list > ("Save to yours lists" link on the right). >- save the list. >- browse again results. > >Signed-off-by: Joy Nelson <joy@bywatersolutions.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Tested according to test plan, also checked some other pages and actions >accessible from the detail page. >Passes all tests and QA script. >--- > C4/Auth.pm | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d73edaf..30158cd 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -371,10 +371,15 @@ sub get_template_and_user { > my $LibraryNameTitle = C4::Context->preference("LibraryName"); > $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; > $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; >- # clean up the busc param in the session if the page is not opac-detail >- if (C4::Context->preference("OpacBrowseResults") && $in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) { >- my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID")); >- $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc")); >+ # clean up the busc param in the session if the page is not opac-detail and not the "add to list" page >+ if ( C4::Context->preference("OpacBrowseResults") >+ && $in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ ) { >+ my $pagename = $1; >+ unless ( $pagename =~ /^(?:MARC|ISBD)?detail$/ >+ or $pagename =~ /^addbybiblionumber$/ ) { >+ my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID")); >+ $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc")); >+ } > } > # variables passed from CGI: opac_css_override and opac_search_limits. > my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'}; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11132
:
22362
|
22431
| 22455