Bugzilla – Attachment 43877 Details for
Bug 14996
Remove C4::Dates from tags/review.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14996 - Remove C4::Dates from tags/review.pl
Bug-14996---Remove-C4Dates-from-tagsreviewpl.patch (text/plain), 1.82 KB, created by
Mirko Tietgen
on 2015-10-23 15:14:29 UTC
(
hide
)
Description:
Bug 14996 - Remove C4::Dates from tags/review.pl
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2015-10-23 15:14:29 UTC
Size:
1.82 KB
patch
obsolete
>From 4c172c2abd2b045746a511d3e06959221d56cdcb Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 9 Oct 2015 23:11:22 +0200 >Subject: [PATCH] Bug 14996 - Remove C4::Dates from tags/review.pl > >This patch removes C4::Dates from file tags/review.pl > >To test: >- Create some tags >- Go to Home > Tools > Tags >- Verify that dates display properly >- Verify that the date filter works as before > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >--- > tags/review.pl | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/tags/review.pl b/tags/review.pl >index 4756672..3ea36db 100755 >--- a/tags/review.pl >+++ b/tags/review.pl >@@ -28,7 +28,7 @@ use CGI::Cookie; # need to check cookies before having CGI parse the POST reques > > use C4::Auth qw(:DEFAULT check_cookie_auth); > use C4::Context; >-use C4::Dates qw(format_date format_date_in_iso); >+use Koha::DateUtils; > # use C4::Koha; > use C4::Output qw(:html :ajax pagination_bar); > use C4::Debug; >@@ -169,7 +169,8 @@ if ($filter = $input->param('tag')) { > $filters{term} = $filter; > } > if ($filter = $input->param('from')) { >- if ($date_from = format_date_in_iso($filter)) { >+ $date_from = eval { output_pref( { dt => dt_from_string( $filter ), dateonly => 1, dateformat => 'iso' } ); }; >+ if ( $date_from ) { > $template->param(filter_date_approved_from=>$filter); > $filters{date_approved} = ">=$date_from"; > } else { >@@ -177,7 +178,8 @@ if ($filter = $input->param('from')) { > } > } > if ($filter = $input->param('to')) { >- if ($date_to = format_date_in_iso($filter)) { >+ $date_to = eval { output_pref( { dt => dt_from_string( $filter ), dateonly => 1, dateformat => 'iso' } ); }; >+ if ( $date_to ) { > $template->param(filter_date_approved_to=>$filter); > $filters{date_approved} = "<=$date_to"; > } else { >-- >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 14996
:
43312
|
43877
|
43932