From f831175338d16719e6202b42cb12afa7660877c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Sat, 30 Oct 2021 20:19:39 +0000 Subject: [PATCH] Bug 28263: (QA follow-up) Use new atomicupdate code style MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart --- .../bug_28263-fix_auto_renewal_message.pl | 15 +++++++++++++++ .../bug_28263_fix_auto_renewal_message.perl | 10 ---------- 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_28263-fix_auto_renewal_message.pl delete mode 100644 installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl diff --git a/installer/data/mysql/atomicupdate/bug_28263-fix_auto_renewal_message.pl b/installer/data/mysql/atomicupdate/bug_28263-fix_auto_renewal_message.pl new file mode 100755 index 0000000000..d7e0c706de --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28263-fix_auto_renewal_message.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "28263", + description => "Update AUTO_RENEWAL too_many message", + up => sub { + my ($args) = @_; + my ($dbh) = @$args{qw(dbh)}; + $dbh->do(q{ + UPDATE letter SET + content = REPLACE(content, "You have reached the maximum number of checkouts possible." , "You have reached the maximum number of renewals possible.") + WHERE ( code = 'AUTO_RENEWALS' OR code = 'AUTO_RENEWALS_DGST' ); + }); + }, +} diff --git a/installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl b/installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl deleted file mode 100644 index cbfa8e846b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl +++ /dev/null @@ -1,10 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - UPDATE letter SET - content = REPLACE(content, "You have reached the maximum number of checkouts possible." , "You have reached the maximum number of renewals possible.") - WHERE ( code = 'AUTO_RENEWALS' OR code = 'AUTO_RENEWALS_DGST' ); - }); - - NewVersion( $DBversion, 28263, "Update AUTO_RENEWAL too_many message"); -} -- 2.39.5