[interchange-cvs] interchange - jon modified code/SystemTag/order.coretag

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Wed Jun 5 22:21:00 2002


User:      jon
Date:      2002-06-06 02:20:16 GMT
Modified:  code/SystemTag order.coretag
Log:
Modify 'area' attribute functionality to match that of recent 4.8 patch:
it's a boolean that makes [order] act like [area] instead of [page].

Add several commonly expected attribute aliases.

Allow 'form' attribute to be passed in, additional to variables created
by [order] itself.

Revision  Changes    Path
1.2       +10 -4     interchange/code/SystemTag/order.coretag


rev 1.2, prev_rev 1.1
Index: order.coretag
===================================================================
RCS file: /var/cvs/interchange/code/SystemTag/order.coretag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- order.coretag	29 Jan 2002 05:52:38 -0000	1.1
+++ order.coretag	6 Jun 2002 02:20:16 -0000	1.2
@@ -1,7 +1,14 @@
 UserTag order               Order        code quantity
+UserTag order               attrAlias    item code
+UserTag order               attrAlias    sku code
+UserTag order               attrAlias    table base
+UserTag order               attrAlias    database base
+UserTag order               attrAlias    db base
+UserTag order               attrAlias    mv_ib base
+UserTag order               attrAlias    href page
 UserTag order               addAttr
 UserTag order               PosNumber    2
-UserTag order               Routine   <<EOR
+UserTag order               Routine      <<EOR
 # Returns an href to place an order for the product PRODUCT_CODE.
 # If AlwaysSecure is set, goes by the page accessed, otherwise 
 # if a secure order has been started (with a call to at least
@@ -9,7 +16,6 @@
 sub {
     my($code,$quantity,$opt) = @_;
 	$opt = {} unless $opt;
-    my($r);
 	my @parms = (
 					"mv_action=refresh",
 				  );
@@ -24,12 +30,12 @@
 	push(@parms, "mv_order_quantity=$quantity")
 		if($quantity);
 
-	$opt->{form} = join "\n", @parms;
+	$opt->{form} .= "\n" . join "\n", @parms;
 
 	$opt->{page} = find_special_page('order')
 		unless $opt->{page};
 
-	return form_link($opt->{area}, $opt->{arg}, $opt)
+	return form_link($opt->{page}, $opt->{arg}, $opt)
 		if $opt->{area};
 	return tag_page($opt->{page}, $opt->{arg}, $opt);
 }