On Sun, May 22, 2011 at 03:22:19PM +0200, Peter Bowers wrote:
> On Sun, May 22, 2011 at 12:26 PM, Oliver Betz <[email protected]> wrote:
> I would love to see either (1) a change to core to provide access to
> $pagename (validated), $name, and $group throughout config.php and
> farmconfig.php.
Can't do this, because resolving the pagename depends on the values of
other variables ($DefaultPage, $DefaultGroup, $DefaultName,
$GroupPattern, etc.) that might be set in config.php or farmconfig.php.
> Or (2), at least an "officially sanctioned" way to
> access these values via PHP early on in farmconfig and/or
> config.php...
The officially sanctioned way is to use
$pagename = ResolvePageName($pagename);
It's okay if the $pagename argument is blank or partial when the
function is called -- resolving a blank or partial name is exactly
what ResolvePageName does. :-)
Pm
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users