Bugzilla – Attachment 16522 Details for
Bug 8378
<fine> syntax not working on overdues anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8378 - followup - update notices to use <<items.fine>>
Bug-8378---followup---update-notices-to-use-itemsf.patch (text/plain), 1.51 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-03-20 14:01:45 UTC
(
hide
)
Description:
Bug 8378 - followup - update notices to use <<items.fine>>
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-03-20 14:01:45 UTC
Size:
1.51 KB
patch
obsolete
>From a9543d0e3ae51e5ceb337506cbe1686fb367c627 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 20 Mar 2013 14:46:07 +0100 >Subject: [PATCH] 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> >--- > installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index dbb3faa..64d379e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6557,6 +6557,23 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = '3.11.00.XXX'; >+if (C4::Context->preference("Version") < TransformToNum($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 > > =head2 TableExists($table) >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8378
:
11628
|
11804
|
11805
|
11806
|
11906
|
12286
|
14069
|
16387
|
16388
|
16390
|
16407
|
16408
|
16513
|
16515
|
16518
|
16522
|
16528
|
16529
|
16530
|
16531