I'm looking for a way to convert all actions like history, edit, move, delete, 
etc., into "view".  So far, no luck.

Background: This is for a minimal wiki (1.24) that permits anonymous users only 
to read (action=view) and disables all other actions (history, edit, move, 
etc.).  Logged-in users have full capabilities.

I can easily achieve the goal with the hook "MediaWikiPerformAction", throwing 
a 404 with an error page. But I'd much rather *convert* all actions into "view" 
instead of displaying errors, so "MyTitle?action=history" becomes 
"MyTitle?action=view".

I can't seem to do this with MediaWikiPerformAction because I can't seem to 
modify the action. The request object is provided only by value, the MediaWiki 
object's context is private, and changing 
RequestContext::getMain()->getRequest() doesn't seem to do it.

Any suggestions on the best way to do this?
Thanks very much!
DanB



  ________________________________
My email address has changed to [email protected]. Please update your address 
book.

Cimpress is the new name for Vistaprint NV, the world’s leader in mass 
customization. Read more about Cimpress at www.cimpress.com.

  ________________________________
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to