[pmwiki-users] newpagebox
Hans
design at softflow.co.uk
Thu Mar 23 15:08:29 CST 2006
I had repeated comments that the newpagebox script fails in one
respect: when a base group was specified to have a new page created in
that group, and the name for the page entered matched an existing
group name, then the result was a redirection to edit the existing
group page, instead of a new page in the base group.
I think I succeeded in fixing this, and uploaded an updated
newpageboxplus.php at
http://www.pmwiki.org/wiki/Cookbook/NewPageBoxPlus
Changes to the code to fix this:
replaced in $defaults = array(
'base' => $pagename,
with
'base' => '',
replaced in function HandleNew($pagename)
$base = MakePageName($pagename, $_REQUEST['base']);
$newpage = MakePageName($base, $name);
with
$base = MakePageName($pagename, $_REQUEST['base']);
$basegroup = PageVar($base, '$Group');
if (@$_REQUEST['base']=='') $newpage = MakePageName($pagename, $name);
else $newpage = MakePageName($base, "$basegroup.$name");
Any comments?
Best,
Hans
More information about the pmwiki-users
mailing list