[Pmwiki-users] Suggested change to pgcust.php

John Rankin john.rankin at affinity.co.nz
Tue May 13 18:18:57 CDT 2003


On Wednesday, 14 May 2003 10:07 AM, Patrick R. Michaud <pmichaud at pobox.com>=
 wrote:
On Wed, May 14, 2003 at 09:51:13AM +1200, John Rankin wrote:
> Proposal:
> change the line that reads
>     $group =3D FmtPageName('$Group',$pagename);
>=20
> to
>     if (preg_match("/^($GroupNamePattern)[.\\/]?\$/",$pagename,$match)) {=

>         $group =3D $match[1];
>     } else {
>         $group =3D FmtPageName('$Group',$pagename);
>     }


This seems to be a reasonable change.  I'll put it in the next release.
Thanks for the suggestion.

Should I just go ahead and do the same thing for titles, as in

   if (preg_match("/^($GroupNamePattern)([.\\/]($PageTitlePattern))?/",
       $pagename,$match)) {
     $group =3D $match[1];
     $title =3D $match[3];
   }=20

and skip the FmtPageName altogether? =20

Pm

--
May as well -- it's shorter and clearer.

JR






More information about the pmwiki-users mailing list