Bugzilla – Attachment 44556 Details for
Bug 14985
Remove C4::Dates from 6 files in folder C4/*.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14985: (followup) Remove eval if dates come from database
Bug-14985-followup-Remove-eval-if-dates-come-from-.patch (text/plain), 3.42 KB, created by
Marc Véron
on 2015-11-06 13:23:47 UTC
(
hide
)
Description:
Bug 14985: (followup) Remove eval if dates come from database
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-11-06 13:23:47 UTC
Size:
3.42 KB
patch
obsolete
>From 4e95f179898d10d31005f4ce71bd72279612d038 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 6 Nov 2015 14:07:30 +0100 >Subject: [PATCH] Bug 14985: (followup) Remove eval if dates come from > database > >This patch removes some evals from date-formatting where the dates come >from the database. > >See comments #7 - #9 > >Additionaly, C4/VirtualShelves/Page.pm is removed from the patches (obsolete). >--- > C4/Members.pm | 2 +- > C4/Reserves.pm | 4 ++-- > C4/Search.pm | 2 +- > C4/Utils/DataTables/Members.pm | 2 +- > 4 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 7ece42e..e2bbe6d 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -2264,7 +2264,7 @@ sub GetMessages { > my @results; > > while ( my $data = $sth->fetchrow_hashref ) { >- $data->{message_date_formatted} = eval { output_pref( { dt => dt_from_string( $data->{message_date} ), dateonly => 1, dateformat => 'iso' } ); }; >+ $data->{message_date_formatted} = output_pref( { dt => dt_from_string( $data->{message_date} ), dateonly => 1, dateformat => 'iso' } ); > push @results, $data; > } > return \@results; >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d2161cc..29a0aa5 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -165,9 +165,9 @@ sub AddReserve { > > my $dbh = C4::Context->dbh; > >- $resdate = eval { output_pref( { dt => dt_from_string( $resdate ), dateonly => 1 }); } >+ $resdate = eval { output_pref( { dt => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }); } > if ( $resdate ); >- $resdate = eval { output_pref( { dt => dt_from_string, dateonly => 1 }); } >+ $resdate = eval { output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); } > unless ( $resdate ); > > if ($expdate) { >diff --git a/C4/Search.pm b/C4/Search.pm >index b3b3a52..b895993 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2094,7 +2094,7 @@ sub searchResults { > { > $onloan_count++; > my $key = $prefix . $item->{onloan} . $item->{barcode}; >- $onloan_items->{$key}->{due_date} = eval { output_pref( { dt => dt_from_string( $item->{onloan} ), dateonly => 1 } ); }; >+ $onloan_items->{$key}->{due_date} = output_pref( { dt => dt_from_string( $item->{onloan} ), dateonly => 1 } ); > $onloan_items->{$key}->{count}++ if $item->{$hbranch}; > $onloan_items->{$key}->{branchname} = $item->{branchname}; > $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} }; >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index 5b1ffee..5e0b812 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -142,7 +142,7 @@ sub search { > ($patron->{overdues}, $patron->{issues}, $patron->{fines}) = > GetMemberIssuesAndFines($patron->{borrowernumber}); > if($patron->{dateexpiry} and $patron->{dateexpiry} ne '0000-00-00') { >- $patron->{dateexpiry} = eval { output_pref( { dt => dt_from_string( $patron->{dateexpiry}), dateonly => 1, dateformat => 'iso' } ); }; >+ $patron->{dateexpiry} = output_pref( { dt => dt_from_string( $patron->{dateexpiry}), dateonly => 1, dateformat => 'iso' } ); > } else { > $patron->{dateexpiry} = ''; > } >-- >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 14985
:
43285
|
44439
|
44556
|
44621
|
44699
|
44700
|
44701
|
44739
|
44740
|
44741
|
44764
|
44765