From 12dfbe7f037dae1c4825de53932a10c29e7b3852 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 12 May 2020 11:11:38 +0100 Subject: [PATCH] Bug 24378: DBRev 19.12.00.088 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../atomicupdate/bug_24378_auto_renewals.perl | 35 ------------------- installer/data/mysql/updatedatabase.pl | 35 +++++++++++++++++++ 3 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24378_auto_renewals.perl diff --git a/Koha.pm b/Koha.pm index 3847fe4a93..aaf86ba0a6 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 = "19.12.00.087"; +$VERSION = "19.12.00.088"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24378_auto_renewals.perl b/installer/data/mysql/atomicupdate/bug_24378_auto_renewals.perl deleted file mode 100644 index c8635a3270..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24378_auto_renewals.perl +++ /dev/null @@ -1,35 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - # you can use $dbh here like: - # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); - - $dbh->do(q{ - UPDATE letter SET - name = REPLACE(name, "notification on auto renewing", "Notification of automatic renewal"), - title = REPLACE(title, "Auto renewals", "Automatic renewal notice"), - content = REPLACE(content, "You have reach the maximum of checkouts possible.", "You have reached the maximum number of checkouts possible.") - WHERE code = 'AUTO_RENEWALS'; - }); - $dbh->do(q{ - UPDATE letter SET - content = REPLACE(content, "You have overdues.", "You have overdue items.") - WHERE code = 'AUTO_RENEWALS'; - }); - $dbh->do(q{ - UPDATE letter SET - content = REPLACE(content, "It's too late to renew this checkout.", "It's too late to renew this item.") - WHERE code = 'AUTO_RENEWALS'; - }); - $dbh->do(q{ - UPDATE letter SET - content = REPLACE(content, "You have too much unpaid fines.", "Your total unpaid fines are too high.") - WHERE code = 'AUTO_RENEWALS'; - }); - $dbh->do(q{ - UPDATE letter SET - content = REPLACE(content, "The following item [% biblio.title %] has correctly been renewed and is now due [% checkout.date_due %]", "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due as_due_date => 1 %] -") - WHERE code = 'AUTO_RENEWALS'; - }); - NewVersion( $DBversion, 24378, "Fix some grammatical errors in default auto renewal notice"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f9ad3f97a0..a062821f20 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22057,6 +22057,41 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 25184, "Items with a negative notforloan status should not be captured for holds"); } +$DBversion = '19.12.00.088'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q{ + UPDATE letter SET + name = REPLACE(name, "notification on auto renewing", "Notification of automatic renewal"), + title = REPLACE(title, "Auto renewals", "Automatic renewal notice"), + content = REPLACE(content, "You have reach the maximum of checkouts possible.", "You have reached the maximum number of checkouts possible.") + WHERE code = 'AUTO_RENEWALS'; + }); + $dbh->do(q{ + UPDATE letter SET + content = REPLACE(content, "You have overdues.", "You have overdue items.") + WHERE code = 'AUTO_RENEWALS'; + }); + $dbh->do(q{ + UPDATE letter SET + content = REPLACE(content, "It's too late to renew this checkout.", "It's too late to renew this item.") + WHERE code = 'AUTO_RENEWALS'; + }); + $dbh->do(q{ + UPDATE letter SET + content = REPLACE(content, "You have too much unpaid fines.", "Your total unpaid fines are too high.") + WHERE code = 'AUTO_RENEWALS'; + }); + $dbh->do(q{ + UPDATE letter SET + content = REPLACE(content, "The following item [% biblio.title %] has correctly been renewed and is now due [% checkout.date_due %]", "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due as_due_date => 1 %] +") + WHERE code = 'AUTO_RENEWALS'; + }); + + NewVersion( $DBversion, 24378, "Fix some grammatical errors in default auto renewal notice"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5