Add $this as a parameter to LoadAllMessages.
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 7 May 2009 18:49:57 +0000 (18:49 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 7 May 2009 18:49:57 +0000 (18:49 +0000)
docs/hooks.txt
includes/MessageCache.php

index 755b36e..11414b1 100644 (file)
@@ -862,6 +862,7 @@ $linkType: The external link type
 &$tags: The list of tags.
 
 'LoadAllMessages': called by MessageCache::loadAllMessages() to load extensions messages
+&$this: The MessageCache object
 
 'LoadExtensionSchemaUpdates': called by maintenance/updaters.inc when upgrading database schema
 
index 185b617..6f1f9fd 100644 (file)
@@ -787,7 +787,7 @@ class MessageCache {
                # Some extensions will load their messages when you load their class file
                wfLoadAllExtensions();
                # Others will respond to this hook
-               wfRunHooks( 'LoadAllMessages' );
+               wfRunHooks( 'LoadAllMessages', array( $this ) );
                # Some register their messages in $wgExtensionMessagesFiles
                foreach ( $wgExtensionMessagesFiles as $name => $file ) {
                        wfLoadExtensionMessages( $name, $lang );