Bug 19892: Replace numbersphr variable with Koha.Preference('OPACNumbersPreferPhrase...
authorCharlotte Cordwell <charlotte.cordwell123@gmail.com>
Thu, 18 Jan 2018 01:29:05 +0000 (01:29 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 2 Apr 2018 21:08:07 +0000 (18:08 -0300)
Test Case
1) Check that the following files have been changed properly.
opac/opac-search.pl
 opac/opac-main.pl
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt

2)Apply bug
3) Check that there are no differences in behaviour as a result of the patch.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
opac/opac-main.pl
opac/opac-search.pl

index 1705184..f5308ea 100644 (file)
@@ -54,7 +54,7 @@
                                         [% IF ( expanded_options ) %]
                                             <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title phrase</option>
                                             <option value="se,wrdl">Series title</option>
-                                            [% IF ( numbersphr) %]
+                                            [% IF ( Koha.Preference('OPACNumbersPreferPhrase') ) %]
                                                 <option value="callnum,phr">Call number</option>
                                             [% ELSE %]
                                                 <option value="callnum">Call number</option>
@@ -79,7 +79,7 @@
                                         <option value="pb,wrdl">Publisher</option>
                                         <option value="pl,wrdl">Publisher location</option>
                                         [% IF ( expanded_options ) %]
-                                            [% IF ( numbersphr) %]
+                                            [% IF ( Koha.Preference('OPACNumbersPreferPhrase') ) %]
                                                 <option value="sn,phr">Standard number</option>
                                             [% ELSE %]
                                                 <option value="sn">Standard number</option>
index 723dced..2398b6a 100755 (executable)
@@ -102,8 +102,4 @@ if (C4::Context->preference('GoogleIndicTransliteration')) {
         $template->param('GoogleIndicTransliteration' => 1);
 }
 
-if (C4::Context->preference('OPACNumbersPreferPhrase')) {
-        $template->param('numbersphr' => 1);
-}
-
 output_html_with_http_headers $input, $cookie, $template->output;
index f06e40a..82a0319 100755 (executable)
@@ -380,9 +380,6 @@ if ( $template_type && $template_type eq 'advsearch' ) {
         }
     }
 
-    if (C4::Context->preference('OPACNumbersPreferPhrase')) {
-        $template->param('numbersphr' => 1);
-    }
 
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit;