[pmwiki-users] php weirdness

Maria McKinley parody at u.washington.edu
Wed May 27 18:41:05 CDT 2009


Any idea why this works:

if (substr_count($pagename,'edit')
|| substr_count($pagename,'SiteAdmin')
|| substr_count($pagename,'Blog/NewBlogPage')
) {
$EnableAccessCode = false;
  } else {
## enter access code to write comment
$EnableAccessCode = true;
}

But if I use EnablePostCaptchaRequired instead of EnableAccessCode, it no
longer works? (no longer works means it thinks I should be entering a code
for all pages:

if (substr_count($pagename,'edit')
|| substr_count($pagename,'SiteAdmin')
|| substr_count($pagename,'Blog/NewBlogPage')
) {
$EnablePostCaptchaRequired = 0;
  } else {
## enter access code to write comment
$EnablePostCaptchaRequired = 1;
}

This does work:

if (CondAuth($pagename,'edit')
  { $EnablePostCaptchaRequired = 0;
} else {
## enter access code to write comment
    $EnablePostCaptchaRequired = 1;
}

But, I can't look at or edit SiteAdmin pages.

thanks,
maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090527/da325568/attachment.html 


More information about the pmwiki-users mailing list