On Mon Feb 16 2015 at 7:39:07 AM Daniel Barrett <[email protected]> wrote:

> 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.
>
>
What about RequestContext::getMain()->getOutput()->redirect( $url )?

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

Reply via email to