From: Reini U. <ru...@us...> - 2004-07-09 10:26:02
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668 Modified Files: WikiFormRich.php Log Message: fix the args parser Index: WikiFormRich.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/WikiFormRich.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -b -p -d -r1.1 -r1.2 --- WikiFormRich.php 2 Jul 2004 11:03:53 -0000 1.1 +++ WikiFormRich.php 9 Jul 2004 10:25:52 -0000 1.2 @@ -79,8 +79,9 @@ extends WikiPlugin for ($i = 0; $i < count($arg_array); $i++) { if (preg_match("/^\s*(".join("|",$allowed).")\[\]\s+(.+)\s*$/", $arg_array[$i], $m)) { + $name = $m[1]; $this->inputbox[][$name] = array(); $i = count($this->inputbox) - 1; - foreach (preg_split("/[\s+]/", $m[2]) as $attr_pair) { + foreach (preg_split("/[\s]+/", $m[2]) as $attr_pair) { list($attr,$value) = preg_split("/\s*=\s*/", $attr_pair); - if (preg_match('/^".*"$/', $value, $m)) + if (preg_match('/^"(.*)"$/', $value, $m)) $value = $m[1]; elseif (defined($value)) @@ -172,4 +173,7 @@ extends WikiPlugin // $Log$ +// Revision 1.2 2004/07/09 10:25:52 rurban +// fix the args parser +// // Revision 1.1 2004/07/02 11:03:53 rurban // renamed WikiFormMore to WikiFormRich: better syntax, no eval (safer) |