[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

Changes to the code to fix this:
replaced in  $defaults = array(
    'base' => $pagename,
    'base' => '',

replaced in function HandleNew($pagename)

  $base = MakePageName($pagename, $_REQUEST['base']);
  $newpage = MakePageName($base, $name);


  $base = MakePageName($pagename, $_REQUEST['base']);
  $basegroup = PageVar($base, '$Group');
  if (@$_REQUEST['base']=='') $newpage = MakePageName($pagename, $name);
  else $newpage = MakePageName($base, "$basegroup.$name");

Any comments?


More information about the pmwiki-users mailing list