[pmwiki-users] parameters to a handler function

Peter Kay pkay42 at gmail.com
Fri Jul 8 20:12:15 CDT 2016


So let me check my understanding:

If I set

HandleAuth['myaction']='edit';

And then do

function MyActionCallback($pagename, $auth) {
  $page=RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT);
  #Abort if no page, etc
}

Then a user would need to have edit permissions to do 'myaction',
unless the wiki admin somehow unset HandleAuth['myaction'], right?

Alternately, if you make your callback look like this:
function MyActionCallback($pagename) {
  $page=RetrieveAuthPage($pagename, 'edit', true, READPAGE_CURRENT);
  #abortetc
}

then a user has to have 'edit' permissions, right?

Thanks a bunch - I've got a much better idea of what's going on now :)

--Peter



More information about the pmwiki-users mailing list