[pmwiki-devel] ResolvePageName() before config.php
Patrick R. Michaud
pmichaud at pobox.com
Mon Apr 20 09:20:39 CDT 2009
On Mon, Apr 20, 2009 at 09:49:30AM +0200, Peter & Melodye Bowers wrote:
> > On Monday 20 April 2009 08:27:47 Peter Bowers wrote:
> > > Wouldn't it make better sense to call ResolvePageName() *before*
> > > config.php is included? Is there a down-side to this?
> > Yes there is. The variables $DefaultPage, $DefaultGroup, $DefaultName,
> > $GroupPattern, $NamePattern, need to be set in config.php by many wikis
> > before calling ResolvePageName().
> OK, makes sense with the bigger picture. So what is the preferred way of
> handling this issue? Should recipe authors explicitly not depend on the
> value of $pagename while config.php is being processed? If we need to
> depend on the value of $pagename should we specify that ResolvePageName() be
> called before usage? Should we explicitly call it within the recipe?
> Should we suggest include_once("scripts/stdconfig.php") instead of calling
> ResolvePageName()? What's the best practice in connection with this?
In general I think it depends on the recipe. For most of the recipes I
write, I tend to just call ResolvePageName() in the recipe itself.
More information about the pmwiki-devel