From 0f3cb37b80c5f636cf7e2eff93d03158ca589223 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 24 Feb 2020 13:45:30 +0000 Subject: [PATCH] Bug 24131: (follow-up) Another rebase --- installer/data/mysql/updatedatabase.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2ddd8f8ef9..bf627b766c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20886,8 +20886,7 @@ if( CheckVersion( $DBversion ) ) { $dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system'); } - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 17702 - Add column account_credit_types.archived)\n"; + NewVersion( $DBversion, 17702, 'Add column account_credit_types.archived'); } $DBversion = '19.12.00.030'; @@ -20908,17 +20907,20 @@ if( CheckVersion( $DBversion ) ) { my ($opacheader) = $dbh->selectrow_array( q| SELECT value FROM systempreferences WHERE variable='opacheader'; |); + + my @detail; if( $opacheader ){ foreach my $lang ( @langs ) { - print "Inserting opacheader contents into $lang news item...\n"; # If there is a value in the opacheader preference, insert it into opac_news $dbh->do("INSERT INTO opac_news (branchcode, lang, title, content ) VALUES (NULL, ?, '', ?)", undef, "opacheader_$langs[0]", $opacheader); + push @detail, "Inserted opacheader contents into $lang news item...\n"; } } # Remove the opacheader system preference $dbh->do("DELETE FROM systempreferences WHERE variable='opacheader'"); - SetVersion ($DBversion); - print "Upgrade to $DBversion done (Bug 22880: Move contents of opacheader preference to Koha news system)\n"; + + unshift @detail, 'Move contents of opacheader preference to Koha news system'; + NewVersion( $DBversion, 22880, \@detail); } # SEE bug 13068 -- 2.20.1