Bugzilla – Attachment 44694 Details for
Bug 14969
Remove C4::Dates from serials/*.pl files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14969:(followup) Remove C4::Dates from serials
Bug-14969followup-Remove-C4Dates-from-serials.patch (text/plain), 3.62 KB, created by
Marc Véron
on 2015-11-10 12:42:01 UTC
(
hide
)
Description:
Bug 14969:(followup) Remove C4::Dates from serials
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-11-10 12:42:01 UTC
Size:
3.62 KB
patch
obsolete
>From 50f366799e843a3aec2192435f1f8c28de75a452 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Tue, 10 Nov 2015 13:24:21 +0100 >Subject: [PATCH] Bug 14969:(followup) Remove C4::Dates from serials > >Follow up for comment #15 > >- 1/ Useless spaces removed (I used them to better align the code for > readability >- 2/ $tmpPlannedDate removed. I used it for better readibility. >- 3/ Initializition of $date to '' removed >- 4/ and 5/ Changes removed (they beloged together). >--- > C4/Serials.pm | 9 ++++----- > serials/checkexpiration.pl | 9 ++++----- > 2 files changed, 8 insertions(+), 10 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 85bda8b..67385d9 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -467,9 +467,9 @@ sub GetSubscriptionsFromBiblionumber { > $sth->execute($biblionumber); > my @res; > while ( my $subs = $sth->fetchrow_hashref ) { >- $subs->{startdate} = output_pref( { dt => dt_from_string( $subs->{startdate}), dateonly => 1 } ); >- $subs->{histstartdate} = output_pref( { dt => dt_from_string( $subs->{startdate}), dateonly => 1 } ); >- $subs->{histenddate} = output_pref( { dt => dt_from_string( $subs->{startdate}), dateonly => 1 } ); >+ $subs->{startdate} = output_pref( { dt => dt_from_string( $subs->{startdate}), dateonly => 1 } ); >+ $subs->{histstartdate} = output_pref( { dt => dt_from_string( $subs->{startdate}), dateonly => 1 } ); >+ $subs->{histenddate} = output_pref( { dt => dt_from_string( $subs->{startdate}), dateonly => 1 } ); > $subs->{opacnote} =~ s/\n/\<br\/\>/g; > $subs->{missinglist} =~ s/\n/\<br\/\>/g; > $subs->{recievedlist} =~ s/\n/\<br\/\>/g; >@@ -1631,8 +1631,7 @@ sub ItemizeSerials { > $sth->execute( $data->{'biblionumber'} ); > my $biblioitem = $sth->fetchrow_hashref; > $biblioitem->{'volumedate'} = $data->{planneddate}; >- my $tmpPlannedDate = output_pref( { dt => dt_from_string( $data->{planneddate} ), dateonly => 1 } ); >- $biblioitem->{'volumeddesc'} = $data->{serialseq} . ' (' . $tmpPlannedDate. ')'; >+ $biblioitem->{'volumeddesc'} = $data->{serialseq} . ' (' . output_pref( { dt => dt_from_string( $data->{planneddate} ), dateonly => 1 } ) . ')'; > $biblioitem->{'dewey'} = $info->{itemcallnumber}; > } > } >diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl >index a27490d..2b75cb5 100755 >--- a/serials/checkexpiration.pl >+++ b/serials/checkexpiration.pl >@@ -69,7 +69,7 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user ( > my $title = $query->param('title'); > my $issn = $query->param('issn'); > my $branch = $query->param('branch'); >-my $date = ''; >+my $date; > $date = eval { output_pref( { dt => dt_from_string( $query->param('date') ), dateonly => 1, dateformat => 'iso' }); } > if ( $query->param('date') ); > >@@ -80,12 +80,11 @@ if ($date) { > foreach my $subscription ( @subscriptions ) { > my $subscriptionid = $subscription->{'subscriptionid'}; > my $expirationdate = GetExpirationDate($subscriptionid); >- $expirationdate = eval { output_pref( { dt => dt_from_string( $expirationdate ), dateonly => 1, dateformat => 'iso' }); } >- if ( $expirationdate ); >- >- next unless ( $expirationdate ); > > $subscription->{expirationdate} = $expirationdate; >+ >+ next if $expirationdate !~ /\d{4}-\d{2}-\d{2}/; # next if not in ISO format. >+ > next if $subscription->{closed}; > if ( !C4::Context->preference("IndependentBranches") > or C4::Context->IsSuperLibrarian() >-- >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 14969
:
43182
|
44441
|
44526
|
44527
|
44528
|
44549
|
44550
|
44617
|
44618
|
44694
|
44735
|
44763
|
44775
|
44794
|
44799
|
44930
|
44931