From 8af42e9413d27b46b9299a319fdfab5f22b1c50b Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 1 Jul 2008 03:56:16 +0000 Subject: [PATCH] Pass $mediaWiki object to MediawikiPerformAction hook. --- RELEASE-NOTES | 1 + docs/hooks.txt | 1 + includes/Wiki.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a5238ee84e..969f1c64f6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -176,6 +176,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Allow extensions to modify the user creation form by calling addInputItem(); * Add meta generator tag to HTML output * Two new hooks, ExtendJSGlobalVars and wfMessageCacheReplace added +* MediawikiPerformAction hook is now passed the Mediawiki object === Bug fixes in 1.13 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 5da995eecd..4fab816083 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -829,6 +829,7 @@ $article: $wgArticle $title: $wgTitle $user: $wgUser $request: $wgRequest +$this: The $mediawiki object 'MessagesPreLoad': When loading a message from the database $title: title of the message (string) diff --git a/includes/Wiki.php b/includes/Wiki.php index 04618e08d8..a1bb307127 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -418,7 +418,7 @@ class MediaWiki { function performAction( &$output, &$article, &$title, &$user, &$request ) { wfProfileIn( __METHOD__ ); - if ( !wfRunHooks( 'MediaWikiPerformAction', array( $output, $article, $title, $user, $request ) ) ) { + if ( !wfRunHooks( 'MediaWikiPerformAction', array( $output, $article, $title, $user, $request, $this ) ) ) { wfProfileOut( __METHOD__ ); return; } -- 2.20.1