Bugzilla – Attachment 42960 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]
[SIGNED-OFF]Bug 14923 - Remove C4::Dates from labels/label-item-search.pl
SIGNED-OFFBug-14923---Remove-C4Dates-from-labelsla.patch (text/plain), 2.74 KB, created by
Héctor Eduardo Castro Avalos
on 2015-09-29 20:39:34 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 14923 - Remove C4::Dates from labels/label-item-search.pl
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2015-09-29 20:39:34 UTC
Size:
2.74 KB
patch
obsolete
>From 6917a4491cdaae791d8ccd803f987182974edf81 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Tue, 29 Sep 2015 16:10:00 +0200 >Subject: [PATCH] [SIGNED-OFF]Bug 14923 - Remove C4::Dates from > labels/label-item-search.pl > >This patch removes C4::Dates from labels/label-item-search.pl > >To test: >- 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. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised. C4::Dates is deprecated according to Coding >Guidelines Wiki. >--- > labels/label-item-search.pl | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl >index f28f057..7f67f51 100755 >--- a/labels/label-item-search.pl >+++ b/labels/label-item-search.pl >@@ -28,13 +28,13 @@ use POSIX qw(ceil); > use C4::Auth qw(get_template_and_user); > use C4::Output qw(output_html_with_http_headers); > use C4::Context; >-use C4::Dates; > use C4::Search qw(SimpleSearch); > use C4::Biblio qw(TransformMarcToKoha); > use C4::Items qw(GetItemInfosOf get_itemnumbers_of); > use C4::Koha qw(GetItemTypes); # XXX subfield_is_koha_internal_p > use C4::Creators::Lib qw(html_table); > use C4::Debug; >+use Koha::DateUtils; > > BEGIN { > $debug = $debug || $cgi_debug; >@@ -78,26 +78,26 @@ if ( $op eq "do_search" ) { > $dateto = $query->param('dateto'); > > if ($datefrom) { >- $datefrom = C4::Dates->new($datefrom); >+ $datefrom = output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 }); > if ($QParser) { > $ccl_query .= ' && ' if $ccl_textbox; > $ccl_query .= >- "acqdate(" . $datefrom->output("iso") . '-)'; >+ "acqdate(" . $datefrom . '-)'; > } else { > $ccl_query .= ' and ' if $ccl_textbox; > $ccl_query .= >- "acqdate,st-date-normalized,ge=" . $datefrom->output("iso"); >+ "acqdate,st-date-normalized,ge=" . $datefrom; > } > } > > if ($dateto) { >- $dateto = C4::Dates->new($dateto); >+ $dateto = output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 }); > if ($QParser) { > $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom ); >- $ccl_query .= "acqdate(-" . $dateto->output("iso") . ')'; >+ $ccl_query .= "acqdate(-" . $dateto . ')'; > } else { > $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom ); >- $ccl_query .= "acqdate,st-date-normalized,le=" . $dateto->output("iso"); >+ $ccl_query .= "acqdate,st-date-normalized,le=" . $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