From 6b797605a120c48ddedab75a267531d89d33b00f Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 20 Mar 2025 05:56:48 +0000 Subject: [PATCH] Bug 39372: Database changes Signed-off-by: Marion Durand --- .../data/mysql/atomicupdate/bug_39372.pl | 20 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + 2 files changed, 21 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_39372.pl diff --git a/installer/data/mysql/atomicupdate/bug_39372.pl b/installer/data/mysql/atomicupdate/bug_39372.pl new file mode 100755 index 0000000000..9934c8a88a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_39372.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "39372", + description => "Add system preference OpacAllowPrivateListCreation", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('OpacAllowPrivateListCreation','1',NULL,'Allow OPAC users to create private lists','YesNo'); + } + ); + + say_success( $out, "Added new system preference 'OpacAllowPrivateListCreation'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index f08d6e3448..26cec27714 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -469,6 +469,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'), ('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'), ('OPACAllowHoldDateInFuture','0','','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','YesNo'), +('OpacAllowPrivateListCreation','1',NULL,'If set, allow OPAC users to create private lists','YesNo'), ('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'), ('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'), ('OPACAllowUserToChangeBranch','','Pending, In-Transit, Suspended','Allow users to change the library to pick up a hold for these statuses:','multiple'), -- 2.39.5