Bugzilla – Attachment 7941 Details for
Bug 7620
OPACNoResult, add search string to available parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7620 OPACNoResult, add search string to available parameters
Bug-7620-OPACNoResult-add-search-string-to-availab.patch (text/plain), 1.48 KB, created by
Koha Team University Lyon 3
on 2012-02-29 13:54:07 UTC
(
hide
)
Description:
Bug 7620 OPACNoResult, add search string to available parameters
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2012-02-29 13:54:07 UTC
Size:
1.48 KB
patch
obsolete
>From 4f5a838898bc5117aff6965e385e571f52d830fd Mon Sep 17 00:00:00 2001 >From: Lyon3 Team <koha@univ-lyon3.fr> >Date: Fri, 2 Dec 2011 12:15:38 +0100 >Subject: [PATCH] Bug 7620 OPACNoResult, add search string to available parameters > >This patch add the string entered by the user to OPACNoResultFound > >Test plan: >* activate OPACNoResultFound and use "query_kw" somewhere. For example : ><a href="www.google.com?q=query_kw">Search on Google</a> >* try a search that return no result >* you should see the link to search the query on google >--- > opac/opac-search.pl | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index aba23a8..5ecc54c 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -670,7 +670,14 @@ for (my $i=0;$i<@servers;$i++) { > $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number; > } > # no hits >+ # scdlyon3 extracting keywords in case of relaunching search > else { >+ (my $query_kw=$query_desc)=~s/ and|or / /g; >+ my @query_kw=($query_kw=~ /([-\w]+\b)(?:[^,:]|$)/g); >+ $query_kw=join('+',@query_kw); >+ my $nohits=C4::Context->preference('OPACNoResultsFound'); >+ $nohits=~s/query_kw/$query_kw/g; >+ $template->param( 'OPACNoResultsFound' =>$nohits); > $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc); > } > } # end of the if local >-- >1.7.2.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 7620
:
7941
|
8713
|
10219
|
10253
|
12773
|
14236
|
14240