View | Details | Raw Unified | Return to bug 9395
Collapse All | Expand All

(-)a/catalogue/search.pl (+3 lines)
Lines 182-187 else { Link Here
182
if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
182
if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
183
    $template->param('UNIMARC' => 1);
183
    $template->param('UNIMARC' => 1);
184
}
184
}
185
if (C4::Context->preference("IntranetNumbersPreferPhrase")) {
186
    $template->param('numbersphr' => 1);
187
}
185
188
186
if($cgi->cookie("holdfor")){ 
189
if($cgi->cookie("holdfor")){ 
187
    my $holdfor_patron = GetMember('borrowernumber' => $cgi->cookie("holdfor"));
190
    my $holdfor_patron = GetMember('borrowernumber' => $cgi->cookie("holdfor"));
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 411-413 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
414
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number OPAC searches', 'YesNo');
415
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 6399-6404 if ( CheckVersion($DBversion) ) { Link Here
6399
    SetVersion($DBversion);
6399
    SetVersion($DBversion);
6400
}
6400
}
6401
6401
6402
$DBversion = "3.11.00.XXX";
6403
if ( CheckVersion($DBversion) ) {
6404
   $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OPACNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number OPAC searches', 'YesNo')");
6405
   $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetNumbersPreferPhrase','0', NULL, 'Control the use of phr operator in callnumber and standard number staff client searches', 'YesNo')");
6406
   print "Upgrade to $DBversion done (Bug 9395: Problem with callnumber and standard number search in OPAC and Staff Client)\n";
6407
   SetVersion ($DBversion);
6408
}
6402
6409
6403
=head1 FUNCTIONS
6410
=head1 FUNCTIONS
6404
6411
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc (+8 lines)
Lines 20-29 Link Here
20
    [% END %]
20
    [% END %]
21
    <option value="bc">Barcode</option>
21
    <option value="bc">Barcode</option>
22
    <option value="location">Shelving location</option>
22
    <option value="location">Shelving location</option>
23
    [% IF (numbersphr) %]
24
    <option value="sn,phr">Standard number</option>
25
    [% ELSE %]
23
    <option value="sn">Standard number</option>
26
    <option value="sn">Standard number</option>
27
    [% END %]
24
    <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
28
    <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
25
    <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
29
    <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
30
    [% IF (numbersphr) %]
31
    <option value="callnum,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
32
    [% ELSE %]
26
    <option value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
33
    <option value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
34
    [% END %]
27
    <option value="ln,rtrn">Language</option>
35
    <option value="ln,rtrn">Language</option>
28
    <option value="nt">Notes/Comments</option>
36
    <option value="nt">Notes/Comments</option>
29
    [% IF (marcflavour != 'UNIMARC' ) %]
37
    [% IF (marcflavour != 'UNIMARC' ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (+16 lines)
Lines 79-84 Searching: Link Here
79
                  yes: show
79
                  yes: show
80
                  no: "don't show"
80
                  no: "don't show"
81
            - '"More options" on the OPAC and staff advanced search pages.'
81
            - '"More options" on the OPAC and staff advanced search pages.'
82
        -
83
            - By default,
84
            - pref: OPACNumbersPreferPhrase
85
              type: boolean
86
              choices:
87
                  yes: use
88
                  no: "don't use"
89
            - 'the operator "phr" in the callnumber and standard number OPAC searches'
90
        -
91
            - By default,
92
            - pref: IntranetNumbersPreferPhrase
93
              type: boolean
94
              choices:
95
                  yes: use
96
                  no: "don't use"
97
            - 'the operator "phr" in the callnumber and standard number staff client searches'
82
    Results Display:
98
    Results Display:
83
        -
99
        -
84
            - By default, sort search results in the staff client by
100
            - By default, sort search results in the staff client by
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc (-3 / +11 lines)
Lines 66-76 Link Here
66
		[% ELSE %]
66
		[% ELSE %]
67
        <option value="se">Series</option>
67
        <option value="se">Series</option>
68
		[% END %]
68
		[% END %]
69
		[% IF ( ms_callnum ) %]
69
                [% IF ( numbersphr ) %]
70
                [% IF ( ms_callnum ) %]
71
        <option selected="selected" value="callnum,phr">Call number</option>
72
                [% ELSE %]
73
        <option value="callnum,phr">Call number</option>
74
                [% END %]
75
                [% ELSE %]
76
                [% IF ( ms_callnum ) %]
70
        <option selected="selected" value="callnum">Call number</option>
77
        <option selected="selected" value="callnum">Call number</option>
71
		[% ELSE %]
78
                [% ELSE %]
72
        <option value="callnum">Call number</option>
79
        <option value="callnum">Call number</option>
73
		[% END %]</select>
80
                [% END %]
81
                [% END %]</select>
74
[% IF ( ms_value ) %]
82
[% IF ( ms_value ) %]
75
        <input type="text" title="Type search term" id = "transl1" name="q" value="[% ms_value |html %]" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
83
        <input type="text" title="Type search term" id = "transl1" name="q" value="[% ms_value |html %]" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
76
[% ELSE %]
84
[% ELSE %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt (+13 lines)
Lines 77-83 Link Here
77
[% IF ( expanded_options ) %]
77
[% IF ( expanded_options ) %]
78
            <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title phrase</option>
78
            <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title phrase</option>
79
            <option value="se,wrdl">Series title</option>
79
            <option value="se,wrdl">Series title</option>
80
            [% IF ( numbersphr) %]
81
            <option value="callnum,phr">Call number</option>
82
            [% ELSE %]
80
            <option value="callnum">Call number</option>
83
            <option value="callnum">Call number</option>
84
            [% END %]
81
            <option value="location">Shelving location</option>
85
            <option value="location">Shelving location</option>
82
[% END %]
86
[% END %]
83
            <option value="au,wrdl">Author</option>
87
            <option value="au,wrdl">Author</option>
Lines 99-108 Link Here
99
            <option value="pb,wrdl">Publisher</option>
103
            <option value="pb,wrdl">Publisher</option>
100
            <option value="pl,wrdl">Publisher location</option>
104
            <option value="pl,wrdl">Publisher location</option>
101
[% IF ( expanded_options ) %]
105
[% IF ( expanded_options ) %]
106
            [% IF ( numbersphr) %]
107
            <option value="sn,phr">Standard number</option>
108
            [% ELSE %]
109
            <option value="sn">Standard number</option>
110
            [% END %]
102
            <option value="sn">Standard number</option>
111
            <option value="sn">Standard number</option>
103
            <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
112
            <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
104
            <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
113
            <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
114
            [% IF ( numbersphr) %]
105
            <option value="lcn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
115
            <option value="lcn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
116
            [% ELSE %]
117
            <option value="lcn">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
118
            [% END %]
106
[% ELSE %]
119
[% ELSE %]
107
            <option value="nb">ISBN</option>
120
            <option value="nb">ISBN</option>
108
[% END %]
121
[% END %]
(-)a/opac/opac-main.pl (+4 lines)
Lines 65-68 if (C4::Context->preference('GoogleIndicTransliteration')) { Link Here
65
        $template->param('GoogleIndicTransliteration' => 1);
65
        $template->param('GoogleIndicTransliteration' => 1);
66
}
66
}
67
67
68
if (C4::Context->preference('OPACNumbersPreferPhrase')) {
69
        $template->param('numbersphr' => 1);
70
}
71
68
output_html_with_http_headers $input, $cookie, $template->output;
72
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/opac/opac-search.pl (-1 / +5 lines)
Lines 293-298 if ( $template_type && $template_type eq 'advsearch' ) { Link Here
293
            $template->param( expanded_options => $cgi->param('expanded_options'));
293
            $template->param( expanded_options => $cgi->param('expanded_options'));
294
        }
294
        }
295
    }
295
    }
296
297
    if (C4::Context->preference('OPACNumbersPreferPhrase')) {
298
        $template->param('numbersphr' => 1);
299
    }
300
296
    output_html_with_http_headers $cgi, $cookie, $template->output;
301
    output_html_with_http_headers $cgi, $cookie, $template->output;
297
    exit;
302
    exit;
298
}
303
}
299
- 

Return to bug 9395