From 30487ba4dee2f4593f04fc2befa4fd2c82bcf9c8 Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Fri, 1 Aug 2008 22:38:11 +0000 Subject: [PATCH] adding new hook, MakeGlobalVariablesScript --- RELEASE-NOTES | 2 ++ docs/hooks.txt | 4 ++++ includes/Skin.php | 2 ++ 3 files changed, 8 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f5a74f8569..717806019b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 491b21138e..df13a6650a 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Skin.php b/includes/Skin.php index a996d414ee..8cf19fb156 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -362,6 +362,8 @@ class Skin extends Linker { $vars['wgAjaxWatch'] = $msgs; } + wfRunHooks('MakeGlobalVariablesScript', array(&$vars)); + return self::makeVariablesScript( $vars ); } -- 2.20.1