Bugzilla – Attachment 58333 Details for
Bug 8630
Add covers from AdLibris to the OPAC and Intranet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8630 - Adlibris covers (syspref files)
Bug-8630---Adlibris-covers-syspref-files.patch (text/plain), 5.69 KB, created by
Aleisha Amohia
on 2016-12-21 04:08:42 UTC
(
hide
)
Description:
Bug 8630 - Adlibris covers (syspref files)
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-12-21 04:08:42 UTC
Size:
5.69 KB
patch
obsolete
>From 5b8cad0d0ab5a73d338a7949139c56ca0caf5471 Mon Sep 17 00:00:00 2001 >From: Martin Persson <xarragon@gmail.com> >Date: Mon, 5 Oct 2015 11:13:15 +0200 >Subject: [PATCH] Bug 8630 - Adlibris covers (syspref files) > >This patch adds a system preference for cover images from Swedish >book retailer Adlibris. Images are retrieved via http or https >from an external web server. This might leak OPAC and Staff >interface data to third parties and should thus be used with >caution. > >Sponsored-By: Halland County Library > >Test plan: > >Test 1: Test upgrade procedure for clean installation. > > Start by removing existing sysprefs, if present: > > $ mysql -u kohaadmin -p -D koha > > DELETE FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%'; > >* Apply this patch which will add a pref file, update the 'syspref' > structure and add an atomic upgrade file. > >* Install the update: > Koha$ perl installer/data/mysql/updatedatabase.pl > >* Once upgraded and logged in, Select 'More', 'Administration', > 'Global Preferences' and finally 'Enhanced content'. > There should be a new option called 'Adlibris'. > > The first option should default to "Don't show", if not the > patch is broken. > > The second options should show the default URL: > http://www.adlibris.com/se/organisationer/showimagesafe.aspx > > If not, the patch is broken. > >Test 2: Changing sysprefs > >* In the control panel, change the first value from "Don't show" > to "Show" and save the changes. Use MySQL client to inspect changes: > > $ mysql -u kohaadmin -p -D koha > > SELECT * FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%'; > > The column 'value' should now have the value '1', if not the patch > is broken. > >Test 3: Apply update to existing data > >* Re-execute the installer now that the database has the data already: > Koha$ perl installer/data/mysql/updatedatabase.pl > > If any errors occur the patch is broken. > > Examine the database contents: > > $ mysql -u kohaadmin -p -D koha > > SELECT * FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%'; > > If the values were overwritten by the installer the patch is broken. >--- > .../bug_8630-add_adlibris_cover_image_syspref.sql | 3 +++ > installer/data/mysql/sysprefs.sql | 2 ++ > .../en/modules/admin/preferences/enhanced_content.pref | 16 ++++++++++++++++ > 3 files changed, 21 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_8630-add_adlibris_cover_image_syspref.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_8630-add_adlibris_cover_image_syspref.sql b/installer/data/mysql/atomicupdate/bug_8630-add_adlibris_cover_image_syspref.sql >new file mode 100644 >index 0000000..36107cd >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_8630-add_adlibris_cover_image_syspref.sql >@@ -0,0 +1,3 @@ >+INSERT IGNORE INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES >+('AdlibrisCoversEnabled', '0', NULL, 'Display cover images in OPAC results and detail listing from Swedish retailer Adlibris.','YesNo'), >+('AdlibrisCoversURL', 'http://www.adlibris.com/se/organisationer/showimagesafe.aspx', NULL, 'Base URL for Adlibris cover image web service.', 'Free'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index ef83c3d..7ea4896 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -7,6 +7,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), > ('AddressFormat','us','','Choose format to display postal addresses', 'Choice'), >+('AdlibrisCoversEnabled','0',NULL,'Display cover images in OPAC results and detail listing from Swedish retailer Adlibris.','YesNo'), >+('AdlibrisCoversURL','http://www.adlibris.com/se/organisationer/showimagesafe.aspx',NULL,'Base URL for Adlibris cover image web service.','Free'), > ('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'), > ('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option. Example: eng|fre|ita','Textarea'), > ('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >index 0f1ce3e..1ade6b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >@@ -1,4 +1,20 @@ > Enhanced Content: >+ Adlibris: >+ - >+ - <strong>NOTE:</strong> Using resources such as external images might leak sensitive data to third parties. >+ - >+ - pref: AdlibrisCoversEnabled >+ default: 0 >+ choices: >+ no: "Don't show" >+ yes: "Show" >+ - cover images in OPAC results and detail listing from Swedish retailer <a href="https://www.adlibris.com/se">Adlibris</a>. >+ - >+ - Use base URL: >+ - pref: AdlibrisCoversURL >+ class: url >+ default: "http://www.adlibris.com/se/organisationer/showimagesafe.aspx" >+ - for the <a href="https://www.adlibris.com/se">Adlibris</a> cover service. > All: > - > - <strong>NOTE:</strong> you can only choose one source of cover images from below, otherwise Koha will show the images from all sources selected. >-- >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 8630
:
43188
|
43256
|
43257
|
43258
|
43259
|
43260
|
58333
|
58334
|
58335
|
58336
|
58337
|
58343
|
58344
|
58345
|
58346
|
58347
|
64244
|
64245
|
64246
|
64247
|
64248
|
68366
|
73125
|
73126
|
73127
|
73128
|
73129
|
76848
|
76849
|
76850
|
76851
|
76852
|
76853
|
76859
|
78259
|
78260
|
78261
|
78262
|
78263
|
78264
|
79989
|
79990
|
79991
|
79992
|
79993
|
79994
|
80106
|
80107
|
80108
|
80109
|
80110
|
80111
|
80119
|
80245
|
80246
|
80377
|
80378
|
80379
|
80380
|
80381
|
80382
|
80383
|
81934