[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/bull statecollection.pl [rel_2_2]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha/bull statecollection.pl [rel_2_2] |
Date: |
Tue, 07 Feb 2006 16:21:32 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <address@hidden> 06/02/07 16:21:32
Modified files:
bull : statecollection.pl
Log message:
Bug Fixing empty loops would provide ppl with a bug. Fixing it
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/statecollection.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.11&tr2=1.3.2.12&r1=text&r2=text
Patches:
Index: koha/bull/statecollection.pl
diff -u koha/bull/statecollection.pl:1.3.2.11
koha/bull/statecollection.pl:1.3.2.12
--- koha/bull/statecollection.pl:1.3.2.11 Tue Feb 7 15:33:35 2006
+++ koha/bull/statecollection.pl Tue Feb 7 16:21:32 2006
@@ -116,21 +116,29 @@
);
push @itemlocationloop, \%row;
}
-
-foreach my $data (@serialslist){
- $data->{"itemstatusloop"address@hidden if
((C4::Context->preference("serialsadditems")) && scalar(@itemstatusloop));
- $data->{"itemlocationloop"address@hidden if
((C4::Context->preference("serialsadditems")) && scalar(@itemlocationloop));
- $data->{"branchloop"address@hidden;
- }
+
+if (C4::Context->preference("serialsadditems")){
+ foreach my $data (@serialslist){
+ $data->{"itemstatusloop"address@hidden if
(scalar(@itemstatusloop));
+ $data->{"itemlocationloop"address@hidden if
(scalar(@itemlocationloop));
+ $data->{"branchloop"address@hidden ;
+ }
+}
+
my $sth=$dbh->prepare("select * from subscriptionhistory where subscriptionid
= ?");
$sth->execute($subscriptionid);
my $solhistory = $sth->fetchrow_hashref;
-$template->param(serialadditems =>C4::Context->preference("serialsadditems"),
+if (C4::Context->preference("serialsadditems")){
+ $template->param(serialadditems
=>C4::Context->preference("serialsadditems"),
branchloop => address@hidden,
- ) if
(C4::Context->preference("serialsadditems"));
-$template->param(itemstatus=>1,itemstatusloop=>address@hidden) if
((C4::Context->preference("serialsadditems")) && scalar(@itemstatusloop));
-$template->param(itemlocation=>1,itemlocationloop=>address@hidden) if
((C4::Context->preference("serialsadditems")) && scalar(@itemlocationloop));
+ ) ;
+ $template->param(itemstatus=>1,itemstatusloop=>address@hidden) if
(scalar(@itemstatusloop));
+ $template->param(itemlocation=>1,itemlocationloop=>address@hidden) if
(scalar(@itemlocationloop));
+}else{
+
$template->param(branchloop=>[],itemstatusloop=>[],itemlocationloop=>[]) ;
+}
+
$template->param(
serialslist => address@hidden,
biblionumber => $subscription->{biblionumber},
- [Koha-cvs] koha/bull statecollection.pl [rel_2_2],
Henri-Damien LAURENT <=