From 13bf1dc07a2565de45f2c78904b9b3c4dde8c902 Mon Sep 17 00:00:00 2001 From: James O'Keeffe Date: Thu, 21 Jan 2021 03:12:51 +0000 Subject: [PATCH] Bug 27503: Rename system preference virtualshelves to AllowLists This patch renames virtualshelves to AllowLists Test plan: 1. In Koha Administration, search System preferences for virtualshelves 2. Note the virtualshelves preference 3. Apply the patch and run updatedatabase.pl 4. Search system preferances for virtualshelves, there should be no results 5. Search system preferances for AllowLists 6. ensure that the preferance runs correctly, as if it were virtualshelves. --- .../data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl | 5 +++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- opac/opac-serial-issues.pl | 2 +- opac/opac-shareshelf.pl | 4 ++-- opac/opac-shelves.pl | 4 ++-- serials/serials-collection.pl | 2 +- 11 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl diff --git a/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl b/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl new file mode 100644 index 0000000000..fcd3f402a4 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27503-add_AllowLists_syspref.perl @@ -0,0 +1,5 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{UPDATE systempreferences SET variable="AllowLists" WHERE variable="virtualshelves" }); + NewVersion( $DBversion, 27503, "Renaming virtualshelves to AllowLists"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 7f0afaa594..93e6b64a8c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -713,7 +713,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), ('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'), ('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'), -('virtualshelves','1','','If ON, enables Lists management','YesNo'), +('AllowLists','1','','If ON, enables Lists management','YesNo'), ('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'), ('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'), ('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 15c075591b..e72f9eecaf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -161,7 +161,7 @@ CAN_user_serials_create_subscription ) %] - [% END # /IF virtualshelves %] + [% END # /IF AllowLists %]
Print
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index c5532ca5e4..54e4da446f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -54,7 +54,7 @@ Administration: '#': "#'s" - - "Allow staff and patrons to create and view saved lists of books: " - - pref: virtualshelves + - pref: AllowLists choices: yes: "Yes" no: "No" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 80ef59b67e..94f05c0f20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -125,7 +125,7 @@ - [% END # /IF virtualshelves %] + [% END # /IF AllowLists %] [% IF ( CAN_user_reserveforothers_place_holds && DisplayMultiPlaceHold ) %] [% IF ( holdfor or holdforclub ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 885a487a36..025b123dbc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -78,7 +78,7 @@ [% END # / IF opacuserlogin %] - [% END # / IF virtualshelves %] + [% END # / IF AllowLists %] [% IF Koha.Preference( 'opacuserlogin' ) == 1 || Koha.Preference( 'EnableOpacSearchHistory') || Koha.Preference( 'opaclanguagesdisplay' ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index becfbf99bb..95072df5f8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -266,7 +266,7 @@ [% END %] [% END %] [% END # IF RequestOnOpac %] - [% END # IF virtualshelves %] + [% END # IF AllowLists %] [% END # IF opacbookbag%] @@ -811,7 +811,7 @@ param1 += "