MediaWiki r43632 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r43631‎ | r43632 (on ViewVC)‎ | r43633 >
Date:20:04, 17 November 2008
Author:brion
Status:ok
Tags:
Comment:
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...
Modified paths:

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
===================================================================
--- trunk/phase3/docs/hooks.txt	(revision 43631)
+++ trunk/phase3/docs/hooks.txt	(revision 43632)
@@ -889,7 +889,6 @@
 '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: trunk/phase3/includes/Skin.php
===================================================================
--- trunk/phase3/includes/Skin.php	(revision 43631)
+++ trunk/phase3/includes/Skin.php	(revision 43632)
@@ -409,7 +409,7 @@
 			$vars['wgAjaxWatch'] = $msgs;
 		}
 
-		wfRunHooks('MakeGlobalVariablesScript', array( &$vars, &$wgUser ) );
+		wfRunHooks('MakeGlobalVariablesScript', array(&$vars));
 
 		return self::makeVariablesScript( $vars );
 	}

Status & tagging log

Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox