Bugzilla – Attachment 15314 Details for
Bug 9574
serials/subscription-add.pl does not work right under Plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9574: Plack fixes for serials/subscription-add.pl
Bug-9574-Plack-fixes-for-serialssubscription-addpl.patch (text/plain), 2.61 KB, created by
Chris Cormack
on 2013-02-14 08:57:14 UTC
(
hide
)
Description:
Bug 9574: Plack fixes for serials/subscription-add.pl
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-02-14 08:57:14 UTC
Size:
2.61 KB
patch
obsolete
>From 2d522e120257ea84e45c509d13d25515ad289a49 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sun, 10 Feb 2013 13:25:44 -0500 >Subject: [PATCH] Bug 9574: Plack fixes for serials/subscription-add.pl > >This patch fixes the following warnings under Plack: >* Use of uninitialized value $firstissuedate in string eq at \ > /home/jcamins/kohaclone/serials/subscription-add.pl line 92. >* Use of uninitialized value $firstissuedate in substr at \ > /home/jcamins/kohaclone/serials/subscription-add.pl line 105. >* Use of qw(...) as parentheses is deprecated at \ > /home/jcamins/kohaclone/serials/subscription-add.pl line 95. >* Variable "$firstissuedate" is not available at \ > /home/jcamins/kohaclone/serials/subscription-add.pl line 338. > >To test: >1) Create a subscription. Ensure that setting the first issue's > publication date works. >2) Edit a subscription. Ensure that the first issue's publication > date shows up. >3) Sign off. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > serials/subscription-add.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index ee1aea4..10bccd1 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -63,7 +63,7 @@ my @subscription_types = ( > my @sub_type_data; > > my $subs; >-my $firstissuedate; >+our $firstissuedate; > > if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > >@@ -74,7 +74,7 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > carp "Attempt to modify subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed"; > print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); > } >- $firstissuedate = $subs->{firstacquidate}; # in iso format. >+ $firstissuedate = $subs->{firstacquidate} || ''; # in iso format. > for (qw(startdate firstacquidate histstartdate enddate histenddate)) { > next unless defined $subs->{$_}; > # TODO : Handle date formats properly. >@@ -92,7 +92,7 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ; > $subs->{nextacquidate} = $nextexpected->{planneddate}->output() if($op eq 'modify'); > unless($op eq 'modsubscription') { >- foreach my $length_unit qw(numberlength weeklength monthlength){ >+ foreach my $length_unit (qw(numberlength weeklength monthlength)) { > if ($subs->{$length_unit}){ > $sub_length=$subs->{$length_unit}; > $sub_on=$length_unit; >-- >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 9574
:
15209
|
15314
|
15876