From a99d7e1a1c6f7c63e8a94f272440b9f511c2fb2a 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 --- 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 844c426935..f19d1261d0 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -262,7 +262,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 9ab4dd9d37..b5653ae3f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -116,7 +116,7 @@ [% UNLESS IndependentBranches %]

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