From 0c890862b204329c43cc62a6dd633156f6c196e3 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 17 Nov 2008 02:33:29 +0000 Subject: [PATCH] Pass the user object in MakeGlobalVariablesScript in case some variables are user-dependent. --- docs/hooks.txt | 1 + includes/Skin.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 4fe332c011..89d1cd20f2 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -889,6 +889,7 @@ $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 +&$wgUser: user (object) currently loading the skin 'MarkPatrolled': before an edit is marked patrolled $rcid: ID of the revision to be marked patrolled diff --git a/includes/Skin.php b/includes/Skin.php index 1da33ec2f6..8bb0f41c6e 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -409,7 +409,7 @@ class Skin extends Linker { $vars['wgAjaxWatch'] = $msgs; } - wfRunHooks('MakeGlobalVariablesScript', array(&$vars)); + wfRunHooks('MakeGlobalVariablesScript', array( &$vars, &$wgUser ) ); return self::makeVariablesScript( $vars ); } -- 2.20.1