From 74f37f189a3c6848940b0e2c27d4ba529fa8c9d7 Mon Sep 17 00:00:00 2001 From: Vitor FERNANDES Date: Tue, 15 Jan 2013 17:19:59 +0000 Subject: [PATCH] Bug 9395: Problem with callnumber and standard number search in OPAC and Staff Client This problem happens because there isn't a operator "phr" in the values of callnumber and standard number search. So many results aren't the corrects ones. Test plan: - Apply the patch - In the dropbox search menu of OPAC main page header, the callnum should have only callnum - In OPAC advanced search the callnumber and standard number options shouldn't have "phr" - In staff client advanced search the callnumber and standard number options shouldn't have "phr" - Change OPACNumbersPreferPhrase and IntranetNumbersPreferPhrase to "use" - The options listed before should use now the operator "phr" - This will resolve the problems with the searches of callnumbers and standard numbers in OPAC and staff client (spaces problems, no results, inconsistent results, etc...) Sponsored-by: KEEP SOLUTIONS --- catalogue/search.pl | 3 +++ installer/data/mysql/sysprefs.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/includes/search_indexes.inc | 8 ++++++++ .../en/modules/admin/preferences/searching.pref | 16 ++++++++++++++++ koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 14 +++++++++++--- .../opac-tmpl/prog/en/modules/opac-advsearch.tt | 13 +++++++++++++ opac/opac-main.pl | 4 ++++ opac/opac-search.pl | 5 +++++ 9 files changed, 70 insertions(+), 3 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index d1a3ca2..680f837 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -182,6 +182,9 @@ else { if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { $template->param('UNIMARC' => 1); } +if (C4::Context->preference("IntranetNumbersPreferPhrase")) { + $template->param('numbersphr' => 1); +} if($cgi->cookie("holdfor")){ my $holdfor_patron = GetMember('borrowernumber' => $cgi->cookie("holdfor")); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index d5d15d7..7d3da4c 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -406,3 +406,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded