Bugzilla – Attachment 55948 Details for
Bug 14457
Integrate LIBRIS spellchecking
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14457 - Follow up
Bug-14457---Follow-up.patch (text/plain), 4.44 KB, created by
Chris Cormack
on 2016-09-29 21:49:19 UTC
(
hide
)
Description:
Bug 14457 - Follow up
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2016-09-29 21:49:19 UTC
Size:
4.44 KB
patch
obsolete
>From f1b23e95794e834c2b687c2308941a1b8ea16ad8 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Thu, 29 Sep 2016 21:47:52 +0000 >Subject: [PATCH] Bug 14457 - Follow up > >Added another syspref for the url of the Libris API >Added sysprefs to syspref.sql > >Please test the 2 patches together >--- > Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm | 4 ++-- > .../data/mysql/atomicupdate/bug_14557_add_libriskey_syspref.sql | 3 ++- > installer/data/mysql/sysprefs.sql | 5 +++-- > .../prog/en/modules/admin/preferences/searching.pref | 8 ++++++-- > 4 files changed, 13 insertions(+), 7 deletions(-) > >diff --git a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm b/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm >index 5d0b7f0..3cc1aee 100644 >--- a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm >+++ b/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm >@@ -29,9 +29,9 @@ sub NAME { > sub get_suggestions { > my ($self, $query) = @_; > my $key = C4::Context->preference('LibrisKey'); >- >+ my $base = C4::Context->prefernce('LibrisURL'); > my $search = $query->{'search'}; >- my $response = LWP::UserAgent->new->get("http://api.libris.kb.se/bibspell/spell?query={$search}&key=$key"); >+ my $response = LWP::UserAgent->new->get($base."spell?query={$search}&key=$key"); > my $xml = XMLin($response->content, NoAttr => 1, ForceArray => qr/term/); > > my @terms; >diff --git a/installer/data/mysql/atomicupdate/bug_14557_add_libriskey_syspref.sql b/installer/data/mysql/atomicupdate/bug_14557_add_libriskey_syspref.sql >index 4f36288..c7d2386 100644 >--- a/installer/data/mysql/atomicupdate/bug_14557_add_libriskey_syspref.sql >+++ b/installer/data/mysql/atomicupdate/bug_14557_add_libriskey_syspref.sql >@@ -1 +1,2 @@ >-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'); >+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'); >+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'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 169665f..db2ad17 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -553,5 +553,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'), > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), >-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') >-; >+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), >+('LibrisKey', '', 'This key must be obtained at http://api.libris.kb.se/. It is unique for the IP of the server.', NULL, 'Free'), >+('LibrisURL', 'http://api.libris.kb.se/bibspell/', 'This it the base URL for the Libris spellchecking API.',NULL,'Free'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >index 249ad15..7b55737 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >@@ -228,8 +228,12 @@ Searching: > yes: "search" > no: "don't search" > - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on. >- API Keys: >+ Did you Mean/Spell checking: > - >- - LIBRIS Spellcheking API key >+ - LIBRIS Spellchecking API key > - pref: LibrisKey > - "Can be obtained at http://api.libris.kb.se/bibspell." >+ - >+ - LIBRIS base URL >+ - pref: LibrisURL >+ - "Please only change this if you are sure it needs changing." >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14457
:
40816
|
40827
|
45967
|
55948
|
56609
|
86569
|
87374
|
87375
|
87376
|
87377