Bugzilla – Attachment 43064 Details for
Bug 14923
Remove C4::Dates from labels/label-item-search.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14923 - (follow up) Add test for invalid dates using eval
Bug-14923---follow-up-Add-test-for-invalid-dates-u.patch (text/plain), 1.88 KB, created by
Marc Véron
on 2015-10-02 13:31:54 UTC
(
hide
)
Description:
Bug 14923 - (follow up) Add test for invalid dates using eval
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-10-02 13:31:54 UTC
Size:
1.88 KB
patch
obsolete
>From 0b66088b22fd010afc22502dc3e1697dee2d85de Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 2 Oct 2015 15:28:54 +0200 >Subject: [PATCH] Bug 14923 - (follow up) Add test for invalid dates using > eval > >To test: > >- Apply patch >- Go to Home > Tools > Labels home > Manage label batches >- Click "Add item(s)" >- Verify that selection with date after and date before works > the same as without patch. >- Verify that you can not trigger a software error using invalid > dates as 0000-00-00 or 32/01/1970 (copy/paste to date fields). >--- > labels/label-item-search.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl >index efca8fe..0963627 100755 >--- a/labels/label-item-search.pl >+++ b/labels/label-item-search.pl >@@ -78,8 +78,8 @@ if ( $op eq "do_search" ) { > $dateto = $query->param('dateto'); > > if ($datefrom) { >- if ( is_formatted_date_string( $datefrom ) ) { >- $datefrom = output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 }); >+ $datefrom = eval { output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 }); }; >+ if ($datefrom ) { > if ($QParser) { > $ccl_query .= ' && ' if $ccl_textbox; > $ccl_query .= >@@ -93,8 +93,8 @@ if ( $op eq "do_search" ) { > } > > if ($dateto) { >- if ( is_formatted_date_string( $datefrom ) ) { >- $dateto = output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 }); >+ $dateto = eval { output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 }); }; >+ if ($dateto ) { > if ($QParser) { > $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom ); > $ccl_query .= "acqdate(-" . $dateto . ')'; >-- >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 14923
:
42952
|
42960
|
43030
|
43064
|
43139
|
43145
|
43154