From 5a5c034b8d24f66763c53e72dc814821418482c5 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 17 Oct 2023 19:32:44 +0000 Subject: [PATCH] Bug 34188: (follow-up) Rename pref to 'ForceLibrarySelection' and tidy Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_34188.pl | 12 +++++++----- installer/data/mysql/mandatory/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_34188.pl b/installer/data/mysql/atomicupdate/bug_34188.pl index a8dcbd8fd3..a38be9eace 100755 --- a/installer/data/mysql/atomicupdate/bug_34188.pl +++ b/installer/data/mysql/atomicupdate/bug_34188.pl @@ -1,14 +1,16 @@ use Modern::Perl; return { - bug_number => "34188", + bug_number => "34188", description => "Force staff to select a library when logging into the staff interface.", - up => sub { + up => sub { my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - $dbh->do(q{ + my ( $dbh, $out ) = @$args{qw(dbh out)}; + $dbh->do( + q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) - VALUES ('ForcedLibrarySelection', '0', NULL,'Force staff to select a library when logging into the staff interface.', 'YesNo')}); + VALUES ('ForceLibrarySelection', '0', NULL,'Force staff to select a library when logging into the staff interface.', 'YesNo')} + ); # sysprefs say $out "Added new system preference 'ForcedLibrarySelection'"; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 68d1279843..241b43b502 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -265,7 +265,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('FinesIncludeGracePeriod','1',NULL,'If enabled, fines calculations will include the grace period.','YesNo'), ('FinesLog','1',NULL,'If ON, log fines','YesNo'), ('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines). Requires accruefines cronjob.','Choice'), -('ForcedLibrarySelection','0',NULL,'Force staff to select a library when logging into the staff interface.','YesNo'), +('ForceLibrarySelection','0',NULL,'Force staff to select a library when logging into the staff interface.','YesNo'), ('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'), ('GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free'), ('GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 9e2e6e5cb0..bc284e0191 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -135,7 +135,7 @@ [% UNLESS IndependentBranches %]

- [% IF Koha.Preference('ForcedLibrarySelection') %] + [% IF Koha.Preference('ForceLibrarySelection') %]