logo       

Re: Re: PmWiki 0.5.5 causes the calendar script to break: msg#00129

web.wiki.pmwiki.user

Subject: Re: Re: PmWiki 0.5.5 causes the calendar script to break

Ah, thank you.

I have from time to time wondered if local.php might need to be split (at the
administrator's option):

- rules files that define over-rides to system default variables, like
PageNamePattern
- a processing file that adds markup like DoubleBrackets or InlineReplacements

But it's not always a clean separation.

In the extreme case, I had thought of a file called, for example,
PageNamePattern.php held in local/ -- ie a file for every system variable. Then
the pmwiki.php initialisation uses either its default value or the contents of
a local/config/SystemVariable.php file. (This scheme wouldn't work if one
wanted to have different rules in different groups -- although it could
probably be made to.) I envisaged PmWiki shipping with the default collection
in a scripts/config/ directory.

It is possible that there are only a few critical variables that would need to
be treated this way, the rest can be handled in local.php as now.
--
John Rankin

On Wednesday, 25 June 2003 11:34 AM, Patrick R. Michaud <pmichaud@xxxxxxxxx>
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).

This is a catch-22 situation for pmwiki.php--it seems I can either
uncritically use the value of PATH_INFO, making things much more
difficult for people who are on webhosting services where PATH_INFO
isn't set, or I can set $pagename to be PATH_INFO only if it matches
the group/page name pattern, making things more difficult for those
who are setting custom groupname or pagename patterns.

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

if (!isset($HTTP_GET_VARS['pagename']) && !isset($HTTP_POST_VARS['pagename']))
$pagename = @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







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise