From 5fcfb58dc1a6674ed6228a8de1729be94486e09e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 15 Aug 2018 12:49:02 -0300 Subject: [PATCH] Bug 21068: DB changes The update DB entry will not remove the prefs if NorwegianPatronDBEnable is set. This patch could be reverted locally by people using it. Signed-off-by: Benjamin Rokseth Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../data/mysql/atomicupdate/bug_21068.perl | 14 ++++++++++++ installer/data/mysql/sysprefs.sql | 5 ----- .../en/modules/admin/preferences/patrons.pref | 22 ------------------- 3 files changed, 14 insertions(+), 27 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_21068.perl diff --git a/installer/data/mysql/atomicupdate/bug_21068.perl b/installer/data/mysql/atomicupdate/bug_21068.perl new file mode 100644 index 0000000000..f881a684b3 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_21068.perl @@ -0,0 +1,14 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + my $dbh = C4::Context->dbh; + unless ( C4::Context->preference('NorwegianPatronDBEnable') ) { + $dbh->do(q| + DELETE FROM systempreferences + WHERE variable IN ('NorwegianPatronDBEnable', 'NorwegianPatronDBEndpoint', 'NorwegianPatronDBUsername', 'NorwegianPatronDBPassword', 'NorwegianPatronDBSearchNLAfterLocalHit') + |); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 21068 - Remove system preferences NorwegianPatronDB*)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 0e39905434..80a03a7ee0 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -282,11 +282,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'), ('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before check outs are blocked','Integer'), ('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'), -('NorwegianPatronDBEnable','0',NULL,'Enable communication with the Norwegian national patron database.', 'YesNo'), -('NorwegianPatronDBEndpoint','',NULL,'Which NL endpoint to use.', 'Free'), -('NorwegianPatronDBUsername','',NULL,'Username for communication with the Norwegian national patron database.','Free'), -('NorwegianPatronDBPassword','',NULL,'Password for communication with the Norwegian national patron database.','Free'), -('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo'), ('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'), ('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), ('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 4adcf1bb44..c9cad7d9a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -211,25 +211,3 @@ Patrons: yes: Allow only superlibrarians no: Allow all permitted users - "to access/change superlibrarian privileges. Note: A permitted user needs to have the 'permissions' flag (if no superlibrarian)." - - "Norwegian patron database": - - - - pref: NorwegianPatronDBEnable - choices: - yes: Enable - no: Disable - - the ability to communicate with the Norwegian national patron database via the - - pref: NorwegianPatronDBEndpoint - - endpoint. - - - - Communicate with the Norwegian national patron database using the username - - pref: NorwegianPatronDBUsername - - and the password - - pref: NorwegianPatronDBPassword - - . You can get these from "Base Bibliotek", which is maintained by the Norwegian National Library. - - - - pref: NorwegianPatronDBSearchNLAfterLocalHit - choices: - yes: Do - no: "Don't" - - search the Norwegian national patron database after a local search result was found. -- 2.18.0