From 0069f50aa6e13cccc34c61e6da29f65800806d46 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Wed, 10 Jul 2024 14:34:48 +0000 Subject: [PATCH] Bug 35630: Add new system preference 'AuthorizedValuesLog' --- .../data/mysql/atomicupdate/bug_35630.pl | 19 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/logs.pref | 8 +++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_35630.pl diff --git a/installer/data/mysql/atomicupdate/bug_35630.pl b/installer/data/mysql/atomicupdate/bug_35630.pl new file mode 100755 index 0000000000..cb7d13f0a2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_35630.pl @@ -0,0 +1,19 @@ +use Modern::Perl; + +return { + bug_number => "35630", + description => "Add AuthorizedValuesLog system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('AuthorizedValuesLog', '0', 'If enabled, log authorized value changes', '' , 'YesNo') + } + ); + + say $out "Added new system preference 'AuthorizedValuesLog'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 94acbe3e1c..9304f2e71f 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -79,6 +79,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AuthorityXSLTOpacDetailsDisplay','','','Enable XSL stylesheet control over authority details page in the OPAC','Free'), ('AuthorityXSLTOpacResultsDisplay','','','Enable XSL stylesheet control over authority results page in the OPAC','Free'), ('AuthorityXSLTResultsDisplay','','','Enable XSL stylesheet control over authority results page display on intranet','Free'), +('AuthorizedValuesLog', '0', 'If enabled, log authorized value changes', '' , 'YesNo'), ('AuthorLinkSortBy','default','call_number|pubdate|acqdate|title','Specify the default field used for sorting when click author links','Choice'), ('AuthorLinkSortOrder','asc','asc|dsc|az|za','Specify the default sort order for author links','Choice'), ('AuthSuccessLog','0',NULL,'If enabled, log successful authentications','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref index 985089a9ac..0a02687c12 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref @@ -120,7 +120,13 @@ Logging: 1: Log 0: "Don't log" - any changes to purchase suggestions (create, modify, delete ). - + - + - pref: AuthorizedValuesLog + choices: + 1: Log + 0: "Don't log" + - any changes to authorized values (create, modify, delete ). + Debugging: - - "When logging actions, store a stack trace that goes at most" -- 2.39.2