Bugzilla – Attachment 30127 Details for
Bug 11244
notices ignoring the dateformat preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11244: (follow-up) Fix $dateonly flag
Bug-11244-follow-up-Fix-dateonly-flag.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2014-07-25 15:01:12 UTC
(
hide
)
Description:
Bug 11244: (follow-up) Fix $dateonly flag
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-07-25 15:01:12 UTC
Size:
1.52 KB
patch
obsolete
>From 8af40deb8f4f919c84ad40b2a2141bc382dc7fee Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 20 Jan 2014 13:52:38 +1100 >Subject: [PATCH] Bug 11244: (follow-up) Fix $dateonly flag > >At the moment, $dateonly is set to true when $1 is defined. However, >since the regex capture group only includes the time, this flag will >only be set when there is a value that includes a time. > >In effect, this means that timestamps are reduced to dates only, >while dates have 00-00-0000 added to them. > >This patch keeps the logic but reverses the values, so that $dateonly >will default to true unless $1 is defined. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > C4/Letters.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 0ccbd3a..a3fcbb7 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -622,7 +622,7 @@ sub _parseletter { > my $replacedby = defined ($val) ? $val : ''; > if ( $replacedby and $replacedby =~ m|^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?$| ) { > # If the value is XXXX-YY-ZZ[ AA:BB:CC] we assume it is a date >- my $dateonly = defined $1 ? 1 : 0; >+ my $dateonly = defined $1 ? 0 : 1; #$1 refers to the capture group wrapped in parentheses. In this case, that's the hours, minutes, seconds. > eval { > $replacedby = output_pref({ dt => dt_from_string( $replacedby ), dateonly => $dateonly }); > }; >-- >2.0.0.rc2
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 11244
:
22912
|
22963
|
23213
|
23711
|
23965
|
24557
|
24558
|
29650
|
29651
|
30126
| 30127 |
31030