From 4aedda81970ac6b6a6ce6ad5a9558d4fda3c3152 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 25 Mar 2022 10:37:37 -1000 Subject: [PATCH] Bug 24221: DBRev 21.12.00.020 Signed-off-by: Fridolin Somers --- Koha.pm | 2 +- .../211200020.pl} | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) rename installer/data/mysql/{atomicupdate/bug_24221_move-opacmysummarynote-to-addtional-contents.pl => db_revs/211200020.pl} (81%) mode change 100644 => 100755 diff --git a/Koha.pm b/Koha.pm index 11083650e0..60895503e2 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "21.12.00.019"; +$VERSION = "21.12.00.020"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24221_move-opacmysummarynote-to-addtional-contents.pl b/installer/data/mysql/db_revs/211200020.pl old mode 100644 new mode 100755 similarity index 81% rename from installer/data/mysql/atomicupdate/bug_24221_move-opacmysummarynote-to-addtional-contents.pl rename to installer/data/mysql/db_revs/211200020.pl index 76c1751797..0c9b300fb5 --- a/installer/data/mysql/atomicupdate/bug_24221_move-opacmysummarynote-to-addtional-contents.pl +++ b/installer/data/mysql/db_revs/211200020.pl @@ -7,9 +7,9 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; # Get any existing value from the OpacMySummaryNote system preference - my ( $opacmysummarynote ) = $dbh->selectrow_array( q| + my ( $opacmysummarynote ) = $dbh->selectrow_array(q{ SELECT value FROM systempreferences WHERE variable='OPACMySummaryNote'; - |); + }); if( $opacmysummarynote ){ $dbh->do(q{ INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) @@ -19,6 +19,8 @@ return { $dbh->do(q{ DELETE FROM systempreferences WHERE variable='OPACMySummaryNote' }); + } else { + say $out "No OpacMySummaryNote preference found. Value was empty or update has already been run."; } - } -} + }, +}; -- 2.39.5