From: Reini U. <ru...@us...> - 2004-11-24 15:20:13
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3231 Modified Files: WikiFormRich.php Log Message: allow whitespace in quoted text args Index: WikiFormRich.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/WikiFormRich.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -2 -b -p -d -r1.10 -r1.11 --- WikiFormRich.php 24 Nov 2004 15:07:49 -0000 1.10 +++ WikiFormRich.php 24 Nov 2004 15:19:57 -0000 1.11 @@ -66,4 +66,10 @@ rcs_id('$Id$'); editbox[] name=s text="" checkbox[] name=case_exact ?> + <?plugin WikiFormRich action=AppendText buttontext="AddPlugin" + pulldown[] name=text text="Plugins: " value=<!plugin-list BackLinks page=WikiPlugin !> + ?> + <?plugin WikiFormRich action=AppendText buttontext="AddCategory" + pulldown[] name=text text="Categories: " value=<!plugin-list TitleSearch s=Category !> + ?> */ @@ -103,9 +109,10 @@ extends WikiPlugin $curargs = $m[2]; // must match name=NAME and also value=<!plugin-list name !> - while (preg_match("/^(\w+)=(\"\"|\"?\w+\"?|\"?<!plugin-list.+!>\"?)\s*/", $curargs, $m)) { + while (preg_match("/^(\w+)=((?:\".*\")|(?:\w+)|(?:\"?<!plugin-list.+!>\"?))\s*/", $curargs, $m)) { $attr = $m[1]; $value = $m[2]; $curargs = substr($curargs, strlen($m[0])); - if ($value == '""') $value=''; - elseif (in_array($name, array("pulldown","checkbox","radiobutton")) + if (preg_match("/^\"(.*)\"$/", $value, $m)) + $value = $m[1]; + if (in_array($name, array("pulldown","checkbox","radiobutton")) and preg_match('/^<!plugin-list.+!>$/', $value, $m)) // like pulldown[] name=test value=<!plugin-list BackLinks page=HomePage!> @@ -303,4 +310,7 @@ extends WikiPlugin // $Log$ +// Revision 1.11 2004/11/24 15:19:57 rurban +// allow whitespace in quoted text args +// // Revision 1.10 2004/11/24 15:07:49 rurban // added pulldown support, fixed plugin-list whitespace splitting |