adding new hook, MakeGlobalVariablesScript
authorJack Phoenix <ashley@users.mediawiki.org>
Fri, 1 Aug 2008 22:38:11 +0000 (22:38 +0000)
committerJack Phoenix <ashley@users.mediawiki.org>
Fri, 1 Aug 2008 22:38:11 +0000 (22:38 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/Skin.php

index f5a74f8..7178060 100644 (file)
@@ -40,6 +40,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   $wgCleanSignatures=false
 * Extensions can use the SkinBuildSidebar hook to modify the content of the
   sidebar and add custom portlets to it
+* Added 'MakeGlobalVariablesScript' hook for extensions to be able to add variables
+  into into the output of Skin::makeVariablesScript
 
 === Bug fixes in 1.14 ===
 
index 491b211..df13a66 100644 (file)
@@ -821,6 +821,10 @@ $magicWords: array of strings
 'MagicWordwgVariableIDs': When definig new magic words IDs. DEPRECATED: Use LanguageGetMagic hook instead
 $variableIDs: array of strings
 
+'MakeGlobalVariablesScript': called right before Skin::makeVariablesScript is executed   
+&$vars: variable (or multiple variables) to be added into the output   
+               of Skin::makeVariablesScript
+
 'MarkPatrolled': before an edit is marked patrolled
 $rcid: ID of the revision to be marked patrolled
 $user: the user (object) marking the revision as patrolled
index a996d41..8cf19fb 100644 (file)
@@ -362,6 +362,8 @@ class Skin extends Linker {
                        $vars['wgAjaxWatch'] = $msgs;
                }
 
+               wfRunHooks('MakeGlobalVariablesScript', array(&$vars));
+
                return self::makeVariablesScript( $vars );
        }