(bug 15209) New hook right after initialization
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 3 Aug 2009 22:31:52 +0000 (22:31 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 3 Aug 2009 22:31:52 +0000 (22:31 +0000)
CREDITS
RELEASE-NOTES
docs/hooks.txt
includes/Wiki.php

diff --git a/CREDITS b/CREDITS
index 603a770..bbdf82d 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -83,6 +83,7 @@ following names for their contribution to the product.
 * Marcin Cieślak
 * Marcus Buck
 * Marooned
+* mati
 * Matthew Britton
 * Max Semenik
 * Michael De La Rue
index 607af0e..829103f 100644 (file)
@@ -182,6 +182,8 @@ this. Was used when mwEmbed was going to be an extension.
 * (bug 671) The HTML <abbr> tag is now permitted.
 * RecentChanges now has a legend to explain what the Nmb! flags mean, and the
   flags have tooltips.
+* (bug 15209) New hook BeforeInitialize called after everything has been setup
+  but before Mediawiki::performRequestForTitle()
 
 === Bug fixes in 1.16 ===
 
index 65048b5..7ab916d 100644 (file)
@@ -507,6 +507,14 @@ rendered inline in wiki pages or galleries in category pages.
 &$nt: the image title
 &$time: image timestamp
 
+'BeforeInitialize': before anything is initialized in performRequestForTitle()
+&$title: Title being used for request
+&$article: The associated Article object
+&$output: OutputPage object
+&$user: User
+$request: WebRequest object
+$this: Mediawiki object
+
 'BeforePageDisplay': Prior to outputting a page
 &$out: OutputPage object
 &$skin: Skin object
index 5622545..d385f92 100644 (file)
@@ -54,6 +54,8 @@ class MediaWiki {
                
                $output->setTitle( $title );
                
+               wfRunHooks( 'BeforeInitialize', array( &$title, &$article, &$output, &$user, $request, $this ) );
+               
                if( !$this->preliminaryChecks( $title, $output, $request ) ) {
                        wfProfileOut( __METHOD__ );
                        return;