diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e0bcad0b5d..1f5283d9f8 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6683,7 +6683,22 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } - +$DBversion = '3.11.00.XXX'; +if ( CheckVersion($DBversion) ) { + my $sth = $dbh->prepare(" + SELECT module, code, branchcode, content + FROM letter + WHERE content LIKE '%%' + "); + $sth->execute; + my $sth_update = $dbh->prepare("UPDATE letter SET content = ? WHERE module = ? AND code = ? AND branchcode = ?"); + while(my $row = $sth->fetchrow_hashref){ + $row->{content} =~ s/\w+<\/fine>/<>/; + $sth_update->execute($row->{content}, $row->{module}, $row->{code}, $row->{branchcode}); + } + print "Upgrade to $DBversion done (use new <> syntax in notices)\n"; + SetVersion ($DBversion); +} =head1 FUNCTIONS