[pmwiki-users] Another Problem caused by recent PmWiki updates

Hans design5 at softflow.co.uk
Tue Mar 13 13:25:05 CDT 2007


Tuesday, March 13, 2007, 5:22:25 PM, Patrick wrote:

>> An error line I get with CommentBoxPlus:
>> 
>> Test.Author0Code0Web0Rows4Cols30FmtMultiLabelauthorSignAsAuthor
>>    - Access not permitted!

This is working. A false alarm due to experimental code i forgot to
clear up.

>> In Fox I get a "permission denied edit" error (Fox own error) after
>> failing a MatchPageName check. This code line fails now:
>> 
>>  $permit =
>> (boolean)MatchPageNames($targetname,FmtPageName(implode(' ',
>>        $FoxNameFmt), $pagename));
>> 
>> With beta 31 version it works, i.e.returns 1 for a pagename match
>> against $FoxNameFmt, an array of allowed name patterns.

> Hmm.  I don't think anything has changed in either 
> MatchPageNames or FmtPageName, so I'm not sure where the
> problem would be.  What's the value of $pagename at the time this
> call is made?

This is still puzzling me greatly.
Reverting to beta 31 solves the problem.
But in beta 35  the var $permit never gets set, i.e. something breaks
in the code line I quoted.

$pagename is the full name of the page with the Fox form.
$targetname may be the same or may be different.

$FoxNameFmt is defined thus:

SDVA($FoxNameFmt, array(
    '-$SiteGroup.*',       // no pages in SiteGroup
    '-PmWiki.*',           // no pages in PmWiki group
  //  '{$FullName}-Talk',    // page with -Talk prefix in current group
  //  '{$FullName}-Discuss', // page with -Discuss prefix in current group 
    '{$Group}.*',          // all pages in current group    
    '*.{$Name}-Comment',   // pages with -Comment prefix in any group
    'Comments.{$Group}-{$Name}', //pages in Comments group with name 'Group-Name'
  //  'Comments.*',          // all pages in Comments group
  //  '*.*',                 // all pages
));

Now in config.php I had defined

$FoxNameFmt[] = 'Test*.*';
include_once("$FarmD/cookbook/fox.php");

Intention was to add another pattern to the array.

This seemed to work in beta 31, but not in beta 35.
When I comment $FoxNameFmt[] = 'Test*.*';
all works well.

Can you explain this behaviour to me please?
Why does it work in beta31 and not beta35?

What is the correct way of adding an entry to the array, which is
defined with SDVA? Shall I remove the SDVA?
Do we need to define all of the array, because SDVA will prevent the
default array elements?


Hans




More information about the pmwiki-users mailing list