Marc Dirix <[email protected]> wrote:
> Nope.
Oh, that patch had a typo, and obviously I forgot to post the fixed
version. Sorry about that. Here's a better one:
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 9 Feb 2010 17:19:52 -0000
@@ -2927,14 +2927,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 = v / (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)