Bugzilla – Attachment 15876 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]
[PASSED QA] Bug 9574: Plack fixes for serials/subscription-add.pl
PASSED-QA-Bug-9574-Plack-fixes-for-serialssubscrip.patch (text/plain), 2.73 KB, created by
Katrin Fischer
on 2013-03-05 07:33:40 UTC
(
hide
)
Description:
[PASSED QA] Bug 9574: Plack fixes for serials/subscription-add.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-03-05 07:33:40 UTC
Size:
2.73 KB
patch
obsolete
>From 47df0e81aa7309801c636e5a0ae9867dd0e67e1a 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] [PASSED QA] 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> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >No regressions found, all tests and QA script pass. >--- > 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.9.5
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