http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96015

Revision: 96015
Author:   krinkle
Date:     2011-09-01 17:23:13 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Pass OutputPage instance to MakeGlobalVariablesScript. Allows extensions to 
getTitle()->equals( .. ) and add config vars depending on title

Modified Paths:
--------------
    trunk/phase3/docs/hooks.txt
    trunk/phase3/includes/OutputPage.php

Modified: trunk/phase3/docs/hooks.txt
===================================================================
--- trunk/phase3/docs/hooks.txt 2011-09-01 17:12:01 UTC (rev 96014)
+++ trunk/phase3/docs/hooks.txt 2011-09-01 17:23:13 UTC (rev 96015)
@@ -1221,6 +1221,8 @@
 through ResourceLoaderGetConfigVars instead.
 &$vars: variable (or multiple variables) to be added into the output
        of Skin::makeVariablesScript
+&$out: The OutputPage which called the hook,
+    can be used to get the real title
 
 'MarkPatrolled': before an edit is marked patrolled
 $rcid: ID of the revision to be marked patrolled

Modified: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php        2011-09-01 17:12:01 UTC (rev 
96014)
+++ trunk/phase3/includes/OutputPage.php        2011-09-01 17:23:13 UTC (rev 
96015)
@@ -2658,7 +2658,7 @@
                }
 
                // Allow extensions to add their custom variables to the global 
JS variables
-               wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars ) );
+               wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars, &$this 
) );
 
                return $vars;
        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to