Bugzilla – Attachment 30660 Details for
Bug 10542
QueryParser + OpacSuppression doesn't allow search in 'all libraries'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10542: Fix QueryParser with OpacSupression
PASSED-QA-Bug-10542-Fix-QueryParser-with-OpacSupre.patch (text/plain), 1.67 KB, created by
Katrin Fischer
on 2014-08-10 15:24:05 UTC
(
hide
)
Description:
[PASSED QA] Bug 10542: Fix QueryParser with OpacSupression
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-08-10 15:24:05 UTC
Size:
1.67 KB
patch
obsolete
>From 7bb93a27bed6d0bbaebbf63d2472227f7da20b21 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 12 Mar 2014 17:43:20 +0000 >Subject: [PATCH] [PASSED QA] Bug 10542: Fix QueryParser with OpacSupression > >OpacSupressions manipulates the query string after the buildQuery >call and so breaks with queryParser enabled. This patch adds >checks for queryParser and manipulates the query before passing it >to buildQuery if it is enabled, but leaves the post buildQuery >manipultation when queryParser is disabled > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Adding a sing after test > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > opac/opac-search.pl | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 3b37b43..7edaf6d 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -481,11 +481,19 @@ if (C4::Context->preference('OpacSuppression')) { > my $IPAddress = $ENV{'REMOTE_ADDR'}; > my $IPRange = C4::Context->preference('OpacSuppressionByIPRange'); > if ($IPAddress !~ /^$IPRange/) { >- $query = "($query) not Suppress=1"; >+ if ( $query_type eq 'pqf' ) { >+ $query = "($query) && -(suppress:1)"; >+ } else { >+ $query = "($query) not Suppress=1"; >+ } > } > } > else { >- $query = "($query) not Suppress=1"; >+ if ( $query_type eq 'pqf' ) { >+ $query = "($query) && -(suppress:1)"; >+ } else { >+ $query = "($query) not Suppress=1"; >+ } > } > } > >-- >1.9.1
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 10542
:
26208
|
26251
|
26283
|
26311
|
29909
|
29910
|
29942
|
29944
|
30478
|
30479
| 30660 |
30661