From f460450c091b7bfe295c468d15a7e911c9e0b297 Mon Sep 17 00:00:00 2001 From: Victor Grousset Date: Wed, 13 Dec 2017 20:16:54 +0100 Subject: [PATCH] Bug 19807: Make IntranetCatalogSearchPulldown honor IntranetNumbersPreferPhrase MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch - fixes callnum and sn - Removes unecessary syspref transmission to the template. As the template directly reads the syspref Test plan: 1. Set sysprefs IntranetCatalogSearchPulldown and IntranetNumbersPreferPhrase to true 2. Go to staff:/cgi-bin/koha/catalogue/search.pl 3. "search for" → "call number" and write anything that won't match a call number in the field 4. Then you should see «No results match your search for 'callnum,phr: [...]» 5. Go to the staff homepage 6. Click on "Search the catalog" 7. Do the same search as previouly 8. Then you should see «No results match your search for 'callnum,wrdl: [...]» This shows that IntranetNumbersPreferPhrase isn't honored 9. Apply this patch 10. Redo the same two searches and see that phr will now be always used. So IntranetNumbersPreferPhrase is honored Signed-off-by: Jon Knight Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit df899212b25250cfac412f14478e481acdd6672a) Signed-off-by: Fridolin Somers --- catalogue/search.pl | 3 --- koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 72bb5ec9d4..c198e9fd5b 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -191,9 +191,6 @@ my $lang = C4::Languages::getlanguage($cgi); 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/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc index 354402979c..95d368411a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc @@ -1,3 +1,4 @@ +[% USE Koha %]