Bugzilla – Attachment 27557 Details for
Bug 12136
Problem in opac-topissues.pl if AdvancedSearchTypes has multiple values (separated by pipes)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12136 - Problem in opac-topissues.pl if AdvancedSearchTypes has multiple values (separated by pipes)
Bug-12136---Problem-in-opac-topissuespl-if-Advance.patch (text/plain), 1.87 KB, created by
Marc Véron
on 2014-04-24 19:37:55 UTC
(
hide
)
Description:
Bug 12136 - Problem in opac-topissues.pl if AdvancedSearchTypes has multiple values (separated by pipes)
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-04-24 19:37:55 UTC
Size:
1.87 KB
patch
obsolete
>From 0b80296863ed90536c93d752da11e381c34d0960 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 18 Apr 2014 15:42:30 +0200 >Subject: [PATCH] Bug 12136 - Problem in opac-topissues.pl if > AdvancedSearchTypes has multiple values (separated by > pipes) > >This patch fixes empty dropdown list if AdvancedSearchTypes contains multiple values. >It defaults the dropdown to "All item types". If AdvancedSearchTypes contains ccode, it displays "All collections" > >To test: >1) Set OpacTopissue preferende to "Allow" >2) Set AdvancedSearchTypes to an empty value >-> "Most popular" displays "Limit to" with "All item types" >3) Set AdvancedSearchTypes to 'itemtypes' >-> "Most popular" displays "Limit to" with "All item types" >4) Set AdvancedSearchTypes to 'ccode' >-> "Most popular" displays "Limit to" with "All collections" >5) Set AdvancedSearchTypes to 'ccode|itemtypes' or 'itemtypes|ccode' or 'ccode' >-> "Most popular" should now display "Limit to" with "All collections" >--- > opac/opac-topissues.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl >index 0afc692..c212532 100755 >--- a/opac/opac-topissues.pl >+++ b/opac/opac-topissues.pl >@@ -69,7 +69,13 @@ if (!$do_it && C4::Context->userenv && C4::Context->userenv->{'branch'} ) { > } > my $itemtype = $input->param('itemtype') || ''; > my $timeLimit = $input->param('timeLimit') || 3; >-my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes'); >+ >+#Preliminary fix for bug 12136 with pipe chars in AdvancedSearchTypes >+my $raw_advanced_search_types = C4::Context->preference('AdvancedSearchTypes'); >+my $advanced_search_types = 'itemtypes'; >+if ('ccode' =~ $raw_advanced_search_types) { >+ $advanced_search_types ='ccode'; >+} > > my $whereclause = ''; > $whereclause .= ' AND items.homebranch='.$dbh->quote($branch) if ($branch); >-- >1.7.10.4
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 12136
:
27557