[Koha-cvs] koha/bull subscription-add.pl [rel_2_2]

Ryan Higgins rch at liblime.com
Mon Apr 30 05:34:34 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Ryan Higgins <rych>	07/04/30 03:34:34

Modified files:
	bull           : subscription-add.pl 

Log message:
	bugfix: modsubscription not passing sub length, periodicity or numberpattern to template

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/bull/subscription-add.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.5.2.10&r2=1.5.2.11

Patches:
Index: subscription-add.pl
===================================================================
RCS file: /sources/koha/koha/bull/Attic/subscription-add.pl,v
retrieving revision 1.5.2.10
retrieving revision 1.5.2.11
diff -u -b -r1.5.2.10 -r1.5.2.11
--- subscription-add.pl	15 Jan 2007 17:46:23 -0000	1.5.2.10
+++ subscription-add.pl	30 Apr 2007 03:34:34 -0000	1.5.2.11
@@ -61,17 +61,17 @@
 if ($op eq 'mod') {
 	my $subscriptionid = $query->param('subscriptionid');
 	my $subs = &getsubscription($subscriptionid);
-    if($monthlength > 0){
-	    $sublength = $monthlength;
+    if($subs->{'monthlength'} > 0){
+	    $sublength = $subs->{'monthlength'};
 	    $sub_on = $subscription_types[2];
-	} elsif ($weeklength>0){
-	    $sublength = $weeklength;
+	} elsif ($subs->{'weeklength'}>0){
+	    $sublength = $subs->{'weeklength'};
 	    $sub_on = $subscription_types[1];
 	} else {
-	    $sublength = $numberlength;
+	    $sublength = $subs->{'numberlength'};
 	    $sub_on = $subscription_types[0];
 	}
-        
+       #need to add periodicity and numpattern here. 
 
         while (@subscription_types) {
            my $sub_type = shift @subscription_types;
@@ -95,11 +95,10 @@
 	        weekarrayjs => $weekarrayjs,
 	        weekno => $weekno,
 		);
-
 	$template->param(
-				"periodicity$periodicity" => 1,
-				"dow$dow" => 1,
-	                        "numberpattern$numberpattern" => 1,
+				"periodicity" . $subs->{'periodicity'} => 1,
+				"dow" . $subs->{'dow'} => 1,
+	            "numberpattern" . $subs->{'numberpattern'} => 1,
 				);
 }
 (my $temp, at budgets) = bookfunds();





More information about the Koha-cvs mailing list