From 2beddc7878c36e22b9e1751a2abd71534989c142 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Apr 2016 15:59:02 +0100 Subject: [PATCH] Bug 12752: FIX letter names in 3.15.00.041 Content-Type: text/plain; charset=utf-8 3.15.00.041 was wrong, the name of the letter should not always been the name of the first HOLD notice. PREDUE_PHONE should be updated with the first name of the PREDUE notice, same for OVERDUE_PHONE and OVERDUE Signed-off-by: Chris Cormack Signed-off-by: Marcel de Rooy --- installer/data/mysql/updatedatabase.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 79380be..9e6d390 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8363,10 +8363,9 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.15.00.041"; if ( CheckVersion($DBversion) ) { - my $name = $dbh->selectcol_arrayref(q| + my ( $name ) = $dbh->selectrow_array(q| SELECT name FROM letter WHERE code="HOLD" |); - $name = $name->[0]; $dbh->do(q| UPDATE letter SET code="HOLD", @@ -8375,6 +8374,9 @@ if ( CheckVersion($DBversion) ) { WHERE code="HOLD_PHONE" |, {}, $name); + ( $name ) = $dbh->selectrow_array(q| + SELECT name FROM letter WHERE code="PREDUE" + |); $dbh->do(q| UPDATE letter SET code="PREDUE", @@ -8383,6 +8385,9 @@ if ( CheckVersion($DBversion) ) { WHERE code="PREDUE_PHONE" |, {}, $name); + ( $name ) = $dbh->selectrow_array(q| + SELECT name FROM letter WHERE code="OVERDUE" + |); $dbh->do(q| UPDATE letter SET code="OVERDUE", -- 1.7.10.4