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

(-)a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm (-2 / +2 lines)
Lines 29-37 sub NAME { Link Here
29
sub get_suggestions {
29
sub get_suggestions {
30
    my ($self, $query) = @_;
30
    my ($self, $query) = @_;
31
    my $key = C4::Context->preference('LibrisKey');
31
    my $key = C4::Context->preference('LibrisKey');
32
32
    my $base = C4::Context->preference('LibrisURL');
33
    my $search = $query->{'search'};
33
    my $search = $query->{'search'};
34
    my $response = LWP::UserAgent->new->get("http://api.libris.kb.se/bibspell/spell?query={$search}&key=$key");
34
    my $response = LWP::UserAgent->new->get($base."spell?query={$search}&key=$key");
35
    my $xml = XMLin($response->content, NoAttr => 1, ForceArray => qr/term/);
35
    my $xml = XMLin($response->content, NoAttr => 1, ForceArray => qr/term/);
36
36
37
    my @terms;
37
    my @terms;
(-)a/installer/data/mysql/atomicupdate/bug_14557_add_libriskey_syspref.sql (-1 / +2 lines)
Line 1 Link Here
1
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('LibrisKey', '', 'This key must be obtained at http://api.libris.kb.se/. It is unique for the IP of the server.', NULL, 'Free');
1
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('LibrisKey', '', 'This key must be obtained at http://api.libris.kb.se/. It is unique for the IP of the server.', NULL, 'Free');
2
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('LibrisURL', 'http://api.libris.kb.se/bibspell/', 'This it the base URL for the Libris spellchecking API.',NULL,'Free');
(-)a/installer/data/mysql/sysprefs.sql (-2 / +3 lines)
Lines 647-651 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
647
('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'),
647
('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'),
648
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
648
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
649
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
649
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
650
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
650
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
651
;
651
('LibrisKey', '', 'This key must be obtained at http://api.libris.kb.se/. It is unique for the IP of the server.', NULL, 'Free'),
652
('LibrisURL', 'http://api.libris.kb.se/bibspell/', 'This it the base URL for the Libris spellchecking API.',NULL,'Free');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (-3 / +6 lines)
Lines 243-250 Searching: Link Here
243
                  yes: "search"
243
                  yes: "search"
244
                  no: "don't search"
244
                  no: "don't search"
245
            - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on.
245
            - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on.
246
    API Keys:
246
    Did you Mean/Spell checking:
247
        -
247
        -
248
            - LIBRIS Spellcheking API key
248
            - LIBRIS Spellchecking API key
249
            - pref: LibrisKey
249
            - pref: LibrisKey
250
            - "Can be obtained at http://api.libris.kb.se/bibspell."
250
            - "Can be obtained at http://api.libris.kb.se/bibspell."
251
- 
251
        -
252
            - LIBRIS base URL
253
            - pref: LibrisURL
254
            - "Please only change this if you are sure it needs changing."

Return to bug 14457