Marc Dirix <[email protected]> wrote:

> I think the default tag should be smart an convert the array to
> seperate values in the multiset "value" variable. But I'm not sure how
> this is done.

I think so too. Can you please try this patch?

Index: modules/tags/rxmltags.pike
===================================================================
RCS file: /cvs/Roxen/5.0/server/modules/tags/rxmltags.pike,v
retrieving revision 1.626
diff -u -r1.626 rxmltags.pike
--- modules/tags/rxmltags.pike	25 Jan 2010 15:48:13 -0000	1.626
+++ modules/tags/rxmltags.pike	4 Feb 2010 16:07:31 -0000
@@ -2927,14 +2939,24 @@
 
 string simpletag_default( string t, mapping m, string c, RequestID id)
 {
-  multiset value=(<>);
-  if(m->value) value=mkmultiset((m->value||"")/(m->separator||","));
-  if(m->variable) value+=(<RXML.user_get_var(m->variable, m->scope)>);
-  if(value==(<>)) return c;
+  array value = ({});
+
+  if (mixed v = m->value) {
+    if (stringp (v))
+      value /= m->separator || ",";
+    else
+      // Probably doesn't occur, but have this fallback for completeness sake.
+      value = RXML.t_array.encode (v);
+  }
+
+  if (m->variable)
+    value += RXML.t_array.encode (RXML.user_get_var (m->variable, m->scope));
+
+  if (!sizeof (value)) return c;
 
   return parse_html(c, (["input":internal_tag_input]),
 		    (["select":internal_tag_select]),
-		    m->name, value);
+		    m->name, (multiset) value);
 }
 
 string simpletag_sort(string t, mapping m, string c, RequestID id)

Reply via email to