From: Brion Vibber Date: Mon, 17 Nov 2008 20:04:50 +0000 (+0000) Subject: Revert r43592 "Pass the user object in MakeGlobalVariablesScript in case some variabl... X-Git-Tag: 1.31.0-rc.0~44303 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=add48e7f153065c9877928bac6856f3c1c37b880;p=lhc%2Fweb%2Fwiklou.git Revert r43592 "Pass the user object in MakeGlobalVariablesScript in case some variables are user-dependent." As a UI thingy, $wgUser will be the only relevant user object here; there's no circumstance in which we might pass some other user object. No reason to pass it to hooks just on the off chance that they might use it, then... --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 89d1cd20f2..4fe332c011 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -889,7 +889,6 @@ $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 8bb0f41c6e..1da33ec2f6 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -409,7 +409,7 @@ class Skin extends Linker { $vars['wgAjaxWatch'] = $msgs; } - wfRunHooks('MakeGlobalVariablesScript', array( &$vars, &$wgUser ) ); + wfRunHooks('MakeGlobalVariablesScript', array(&$vars)); return self::makeVariablesScript( $vars ); }