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

(-)a/installer/data/mysql/atomicupdate/bug_28884.pl (+25 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "28884",
6
    description => "Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
13
        VALUES ('ElasticsearchEscapeCharacters', '', NULL, 'List of special characters that should always be escaped in intranet searches', 'Free')}
14
        );
15
16
        say $out "Added new system preference 'ElasticsearchEscapeCharacters'";
17
18
        $dbh->do(
19
            q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
20
        VALUES ('OpacElasticsearchEscapeCharacters', '', NULL, 'List of special characters that should always be escaped in intranet searches', 'Free')}
21
        );
22
23
        say $out "Added new system preference 'OpacElasticsearchEscapeCharacters'";
24
    },
25
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+2 lines)
Lines 242-247 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
242
('EdifactLSQ', 'location', 'location|ccode|', 'Map EDI sequence code (GIR+LSQ) to Koha Item field, empty to ignore', 'Choice'),
242
('EdifactLSQ', 'location', 'location|ccode|', 'Map EDI sequence code (GIR+LSQ) to Koha Item field, empty to ignore', 'Choice'),
243
('ElasticsearchBoostFieldMatch', '0', NULL, 'Add a "match" query to es when searching, will follow indexes chosen in advanced search, or use title-cover for generic keyword or title index search', 'YesNo'),
243
('ElasticsearchBoostFieldMatch', '0', NULL, 'Add a "match" query to es when searching, will follow indexes chosen in advanced search, or use title-cover for generic keyword or title index search', 'YesNo'),
244
('ElasticsearchCrossFields', '1', NULL, 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
244
('ElasticsearchCrossFields', '1', NULL, 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
245
('ElasticsearchEscapeCharacters', '', NULL, 'List of special characters that should always be escaped in intranet searches', 'Free'),
245
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
246
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
246
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
247
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
247
('ElasticsearchMARCFormat', 'base64ISO2709', 'base64ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'),
248
('ElasticsearchMARCFormat', 'base64ISO2709', 'base64ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'),
Lines 509-514 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
509
('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
510
('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
510
('OPACDisableSendList','0',NULL,'Allow OPAC users to email lists via a "Send list" button','YesNo'),
511
('OPACDisableSendList','0',NULL,'Allow OPAC users to email lists via a "Send list" button','YesNo'),
511
('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'),
512
('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'),
513
('OpacElasticsearchEscapeCharacters', '', NULL, 'List of special characters that should always be escaped in intranet searches', 'Free'),
512
('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd',NULL,'Define export options available on OPAC detail page.','multiple'),
514
('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd',NULL,'Define export options available on OPAC detail page.','multiple'),
513
('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'),
515
('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'),
514
('OpacFavicon','',NULL,'Enter a complete URL to an image to replace the default Koha favicon on the OPAC','Free'),
516
('OpacFavicon','',NULL,'Enter a complete URL to an image to replace the default Koha favicon on the OPAC','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (-1 / +8 lines)
Lines 131-136 Searching: Link Here
131
            - "<pre>ccode: [REF,ARC]</pre><br/>  - would mark all REF and ARC collections (Reference and Archives) items as unavailable in Z3950 results.<br/><br/>"
131
            - "<pre>ccode: [REF,ARC]</pre><br/>  - would mark all REF and ARC collections (Reference and Archives) items as unavailable in Z3950 results.<br/><br/>"
132
            - "You can define multiple keys and values, items meeting ANY of the criteria will be marked unavailable:<br/><br/>"
132
            - "You can define multiple keys and values, items meeting ANY of the criteria will be marked unavailable:<br/><br/>"
133
            - "<pre>itype: [REF]<br/>holdingbranch: [REPAIR]</pre><br/>  - would mark all reference items AND items at the REPAIR branch as unavailable."
133
            - "<pre>itype: [REF]<br/>holdingbranch: [REPAIR]</pre><br/>  - would mark all reference items AND items at the REPAIR branch as unavailable."
134
        -
135
            - "The following characters will always be escaped in intranet searches (with Elasticsearch):"
136
            - pref: ElasticsearchEscapeCharacters
137
              class: short
138
            - ".</br>"
139
            - "The following characters will always be escaped in OPAC searches (with Elasticsearch):"
140
            - pref: OpacElasticsearchEscapeCharacters
141
              class: short
134
    Search form:
142
    Search form:
135
        -
143
        -
136
            - pref: LoadSearchHistoryToTheFirstLoggedUser
144
            - pref: LoadSearchHistoryToTheFirstLoggedUser
137
- 

Return to bug 28884