Bugzilla – Attachment 43436 Details for
Bug 14922
Remove C4::Dates from cataloguing/additem.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14922 - (followup) Fix string output
Bug-14922---followup-Fix-string-output.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2015-10-15 12:57:18 UTC
(
hide
)
Description:
Bug 14922 - (followup) Fix string output
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-15 12:57:18 UTC
Size:
1.48 KB
patch
obsolete
>From 6c3d557362bc624d1d73e70a44725ac7a4ae9164 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Wed, 7 Oct 2015 20:42:23 +0200 >Subject: [PATCH] Bug 14922 - (followup) Fix string output > >This patch makes YYYY MM and DD display correctly. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > cataloguing/additem.pl | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 4be75f7..19279b3 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -129,10 +129,11 @@ sub generate_subfield_form { > if ( ! defined( $value ) || $value eq '') { > $value = $subfieldlib->{defaultvalue}; > # get today date & replace YYYY, MM, DD if provided in the default value >- my $today = dt_from_string; >- $value =~ s/YYYY/$today->year/g; >- $value =~ s/MM/$today->month/g; >- $value =~ s/DD/$today->day/g; >+ my $today_iso = output_pref( { dt=>dt_from_string, dateonly => 1, dateformat => 'iso' } ); >+ my ( $year, $month, $day ) = split ('-', $today_iso); >+ $value =~ s/YYYY/$year/g; >+ $value =~ s/MM/$month/g; >+ $value =~ s/DD/$day/g; > } > > $subfield_data{visibility} = "display:none;" if (($subfieldlib->{hidden} > 4) || ($subfieldlib->{hidden} <= -4)); >-- >2.1.0
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 14922
:
42951
|
42973
|
42987
|
43069
|
43203
|
43215
|
43216
|
43435
| 43436