Revision: 43592
Author: demon
Date: 2008-11-17 02:33:29 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
Pass the user object in MakeGlobalVariablesScript in case some variables are
user-dependent.
Modified Paths:
--------------
trunk/phase3/docs/hooks.txt
trunk/phase3/includes/Skin.php
Modified: trunk/phase3/docs/hooks.txt
===================================================================
--- trunk/phase3/docs/hooks.txt 2008-11-17 00:19:24 UTC (rev 43591)
+++ trunk/phase3/docs/hooks.txt 2008-11-17 02:33:29 UTC (rev 43592)
@@ -889,6 +889,7 @@
'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
Modified: trunk/phase3/includes/Skin.php
===================================================================
--- trunk/phase3/includes/Skin.php 2008-11-17 00:19:24 UTC (rev 43591)
+++ trunk/phase3/includes/Skin.php 2008-11-17 02:33:29 UTC (rev 43592)
@@ -409,7 +409,7 @@
$vars['wgAjaxWatch'] = $msgs;
}
- wfRunHooks('MakeGlobalVariablesScript', array(&$vars));
+ wfRunHooks('MakeGlobalVariablesScript', array( &$vars, &$wgUser
) );
return self::makeVariablesScript( $vars );
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs