Pass OutputPage instance to MakeGlobalVariablesScript. Allows extensions to getTitle...
authorKrinkle <krinkle@users.mediawiki.org>
Thu, 1 Sep 2011 17:23:13 +0000 (17:23 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Thu, 1 Sep 2011 17:23:13 +0000 (17:23 +0000)
docs/hooks.txt
includes/OutputPage.php

index 20979f5..44a01b5 100644 (file)
@@ -1221,6 +1221,8 @@ depend on the current page/request; static configuration should be added
 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
index a957e54..a45a3ad 100644 (file)
@@ -2658,7 +2658,7 @@ $distantTemplates
                }
 
                // Allow extensions to add their custom variables to the global JS variables
-               wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars ) );
+               wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars, &$this ) );
 
                return $vars;
        }