[pmwiki-users] Recipes you use/need to be updated for PHP 5.5

John Rankin john.rankin at affinity.co.nz
Thu Jan 9 15:42:54 CST 2014

On 9/01/14 6:35 PM, Petko Yotov wrote:
> John Rankin writes:
>> > John Rankin writes:
>> >> On 8/01/14 12:31 PM, Petko Yotov wrote:
> ...
>> > 2. $pagename is not in the scope of the callback function,
> ...
>> Sorry, I over-simplified. In practice, the $LinkTidy array is defined 
>> once
>> at the start and then referenced as a global variable several times in
>> different places to do the actual tidying. So at the time $LinkTidy is
>> defined, the code may not know the $pagename. Potentially, the 
>> tidying can
>> apply to multiple different $pagename values as it assembles several 
>> wiki
>> pages into one output.
>> Do I use \$pagename instead?
> Once again, $pagename is not automatically in the scope of the 
> callback function. If you want to use $pagename in the callback, it 
> must somehow get into that callback. If it does, yes, when defining 
> the callback, use \$pagename.
Of course; you said that before. Stupid me. Apologies.

Thanks again

John Rankin

More information about the pmwiki-users mailing list