From 5185467226ecf657e26d41515eb06469a4881960 Mon Sep 17 00:00:00 2001 From: William Lavoie Date: Thu, 3 Apr 2025 10:44:07 -0400 Subject: [PATCH] Bug 38040: DB Update - Adding IndependentBranchesHolds syspref --- .../bug_38040-IndependentBranchesHolds_syspref.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_38040-IndependentBranchesHolds_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_38040-IndependentBranchesHolds_syspref.pl b/installer/data/mysql/atomicupdate/bug_38040-IndependentBranchesHolds_syspref.pl new file mode 100644 index 0000000000..a878b5d57f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_38040-IndependentBranchesHolds_syspref.pl @@ -0,0 +1,14 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "38040", + description => "Prevent staff (but not superlibrarians) from modifying holds from other libraries:", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('IndependentBranchesHolds', '1', NULL, 'Prevent staff (but not superlibrarians) from modifying holds from other libraries', 'YESNO')}); + say_success( $out, "Added new system preference 'IndependentBranchesHolds'" ); + }, +}; -- 2.43.0