[Pmwiki-users] Re: PmWiki 0.5.5 causes the calendar script to break

John Rankin john.rankin at affinity.co.nz
Tue Jul 1 20:59:47 CDT 2003


On Wednesday, 25 June 2003 11:34 AM, Patrick R. Michaud <pmichaud at pobox.=
com> wrote:
In 0.5.5 release the algorithm for determining the page name was
changed slightly--previously the pagename would be uncritically set
to the value of the PATH_INFO string, now it is set to only that
portion of the page that matches the Group.PageName pattern.  =
Unfortunately,
this occurs before the local.php is set (i.e., before the administrator
has an opportunity to change the PageNamePattern).

...

The "quick fix" in the calendar case is to add

if (!isset($HTTP_GET_VARS['pagename']) && !isset($HTTP_POST_VARS['pagename'=
]))
   $pagename =3D @substr($HTTP_SERVER_VARS['PATH_INFO'],1);

to the beginning of local.php.  I don't particularly like this solution
but I haven't come up with anything better yet.

Pm

--
The current $PageTitlePattern in pmwiki.php reads:
  [A-Z][A-Za-z0-9]*...

Would the wikiverse unravel if this read:
  [A-Z0-9][A-Za-z0-9]*...

pmwiki.php wouldn't need to change the WikiWordPattern or the =
FreeLinkPattern, just the PageTitlePattern.

There is a 'slippery slope' argument against this idea, but to me it's =
reasonable that a site might want to allow page names to start with a =
number, and it ought to be easy for the administrator to implement such a =
feature. Without help, I would have had a hard time working out how to fix =
the problem.=20

The $PageTitlePattern variable appears to be the only one that causes this =
problem. One option might be to allow an administrator to set it in the ?=
action=3Dattr form. Which leads to another slippery slope...

JR






More information about the pmwiki-users mailing list