[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5475 Wrong messages date formating on Check Out page
Owen Leonard
oleonard at myacpl.org
Mon Dec 6 20:52:06 CET 2010
From: Frédéric Demians <f.demians at tamil.fr>
On the Check Out page, messages related to the borrower are displayed on the
right side. Message text is preceded by a date and library code. The date is
displayed in US format (mm/dd/YYY). Is should be displayed formated depending
on 'dateformat' syspref.
Signed-off-by: Owen Leonard <oleonard at myacpl.org>
---
C4/Members.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/C4/Members.pm b/C4/Members.pm
index 4c1d37c..00716cd 100644
--- a/C4/Members.pm
+++ b/C4/Members.pm
@@ -2073,7 +2073,7 @@ sub GetMessages {
my $query = "SELECT
branches.branchname,
messages.*,
- DATE_FORMAT( message_date, '%m/%d/%Y' ) AS message_date_formatted,
+ message_date,
messages.branchcode LIKE '$branchcode' AS can_delete
FROM messages, branches
WHERE borrowernumber = ?
@@ -2085,6 +2085,8 @@ sub GetMessages {
my @results;
while ( my $data = $sth->fetchrow_hashref ) {
+ my $d = C4::Dates->new( $data->{message_date}, 'iso' );
+ $data->{message_date_formatted} = $d->output;
push @results, $data;
}
return \@results;
--
1.7.1
More information about the Koha-patches
mailing list