From 8003940f2744e1663a047257ac38dae1543a3edd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 10 Mar 2026 12:09:02 -0400 Subject: [PATCH] Bug 42053: Add sip2 to userflags if it doesn't exist Bug 37893 only creates the sip2 userflag if the instance has a SIPConfig.xml set up. This userflag needs to be created reguardless or the instance will not be able to use SIP in the future! Test Plan: 1) Ensure you have no SIPConfig.xml 2) Run the bug 37893 update 3) Note the missing userflag 4) Apply this patch 5) Run updatedatabase.pl again 6) Note the userflag exists! --- .../data/mysql/atomicupdate/bug_42053.pl | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_42053.pl diff --git a/installer/data/mysql/atomicupdate/bug_42053.pl b/installer/data/mysql/atomicupdate/bug_42053.pl new file mode 100755 index 00000000000..c4f708545a7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_42053.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "42053", + description => "Add sip2 user flag if needed", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) + VALUES (31, 'sip2', 'Manage SIP2 module', 0) + } + ); + + say $out "Added sip2 to userflags if needed"; + }, +}; -- 2.50.1 (Apple Git-155)