Bug 8378 - followup - update notices to use <<items.fine>>
Didn't break on well-formed notices, and fixed those with problems Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
22beeff9d9
commit
38eed4fc41
|
|
@ -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 '%<fine>%'
|
||||
");
|
||||
$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/<fine>\w+<\/fine>/<<items.fine>>/;
|
||||
$sth_update->execute($row->{content}, $row->{module}, $row->{code}, $row->{branchcode});
|
||||
}
|
||||
print "Upgrade to $DBversion done (use new <<items.fine>> syntax in notices)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue