From e995dc2b7c1a3480a92a6dc9d33465ca1e3e2a0b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 25 Apr 2014 16:29:07 +0200 Subject: [PATCH] Bug 7673: DB Changes - add system preferences This patch the 2 system preferences SubfieldsToAllowForRestrictedEdition and SubfieldsToAllowForRestrictedBatchmod. --- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ .../prog/en/modules/admin/preferences/cataloguing.pref | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8917081..53a8b94 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8202,6 +8202,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.15.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q{ + INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToAllowForRestrictedEdition','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j','','Free'); + }); + + $dbh->do(q{ + INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToAllowForRestrictedBatchmod','','Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j','','Free'); + }); + + print "Upgrade to $DBversion done (Bug 7673: Adds new systemp preference SubfieldsToAllowForRestrictedEdition and SubfieldsToAllowForRestrictedBatchmod)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 169aec4..1b45f57 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -109,6 +109,20 @@ Cataloging: - pref: UNIMARCField100Language class: short - as default language in the UNIMARC field 100 when creating a new record or in the field plugin. + - + - Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. + - pref: SubfieldsToAllowForRestrictedEdition + - 'Examples:' + - 'UNIMARC: "995$f 995$h 995$j"' + - 'MARC21: "952$a 952$b 952$c"' + - Note that the FA framework is excluded from the permission. + - + - Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces. + - pref: SubfieldsToAllowForRestrictedBatchmod + - 'Examples:' + - 'UNIMARC: "995$f 995$h 995$j"' + - 'MARC21: "952$a 952$b 952$c"' + - Note that the FA framework is excluded from the permission. Display: - - 'Separate multiple displayed authors, series or subjects with ' -- 1.7.10.4