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 553-557 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
553
('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'),
553
('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'),
554
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
554
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
555
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
555
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
556
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
556
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
557
;
557
('LibrisKey', '', 'This key must be obtained at http://api.libris.kb.se/. It is unique for the IP of the server.', NULL, 'Free'),
558
('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 228-235 Searching: Link Here
228
                  yes: "search"
228
                  yes: "search"
229
                  no: "don't search"
229
                  no: "don't search"
230
            - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on.
230
            - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on.
231
    API Keys:
231
    Did you Mean/Spell checking:
232
        -
232
        -
233
            - LIBRIS Spellcheking API key
233
            - LIBRIS Spellchecking API key
234
            - pref: LibrisKey
234
            - pref: LibrisKey
235
            - "Can be obtained at http://api.libris.kb.se/bibspell."
235
            - "Can be obtained at http://api.libris.kb.se/bibspell."
236
- 
236
        -
237
            - LIBRIS base URL
238
            - pref: LibrisURL
239
            - "Please only change this if you are sure it needs changing."

Return to bug 14457