Pass the user object in MakeGlobalVariablesScript in case some variables are user...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 17 Nov 2008 02:33:29 +0000 (02:33 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 17 Nov 2008 02:33:29 +0000 (02:33 +0000)
docs/hooks.txt
includes/Skin.php

index 4fe332c..89d1cd2 100644 (file)
@@ -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
index 1da33ec..8bb0f41 100644 (file)
@@ -409,7 +409,7 @@ class Skin extends Linker {
                        $vars['wgAjaxWatch'] = $msgs;
                }
 
-               wfRunHooks('MakeGlobalVariablesScript', array(&$vars));
+               wfRunHooks('MakeGlobalVariablesScript', array( &$vars, &$wgUser ) );
 
                return self::makeVariablesScript( $vars );
        }