Manual talk:Hooks/MediaWikiPerformAction

Moved from manual page: ''the MediaWiki class is not passed by this hook; however to replace the MediaWiki::performActions method, you need to be able to access it. This can be done by inserting:  as the first line in the hook and returning a value of "false" after execution of the hook is complete. $mediaWiki is a currently undocumented global class variable.''


 * You don't need to specifically override the function in the MediaWiki class. If you look at MediaWiki::performAction, you'll see that if you do something in your hook and return false, none of the actual guts of performAction happens.  That's how you override the function.  You get all of the arguments that are passed to performAction in your hook so its basically like your hook is getting called instead of the normal performAction function.  --Cneubauer 12:27, 22 May 2008 (UTC)