[pmwiki-users] $WikiLibDirs

Hans design5 at softflow.co.uk
Thu Apr 22 04:58:23 CDT 2010

Thursday, April 22, 2010, 3:40:02 AM, DaveG wrote:

> I didn't get much of a chance for testing today, but I can confirm that
> it's the
>    list($Group, $Name) = explode('.', $pagename);

> causing the problem. I didn't have time yet to track down why setting 
> values for $Group/$Name (with correct values) would cause this issue. 
> Obviously setting global variables isn't the right thing to do, so I'll
> change it. As an aside, the 'list' approach has been reccomended on the
> mail-list (and wiki?) before, so we should probably make sure we're 
> careful regarding that recommendation.

I don't see that using list() is wrong here.
Only the setting of $Group and $Name causes the pagelist problem.
You could use
  list($group, $name) = explode('.', $pagename);
to get useful variables.

They will be global if used outside a function, but that itself
should not cause problems. $pagename is also a global variable.
But throughout PmWiki passes on $pagename as a function parameter,
and does not set it inside functions with global $pagename.

With $group and $name one can do it similarly.
And list($group, $name) = explode('.', $pagename); should
avoid the caching issue you mentioned.


More information about the pmwiki-users mailing list