Merge "Add "wgRelevantUserName" from skin to mw.config"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 7 Nov 2013 15:54:29 +0000 (15:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Nov 2013 15:54:29 +0000 (15:54 +0000)
RELEASE-NOTES-1.23
includes/OutputPage.php

index cf51677..ffbdefa 100644 (file)
@@ -29,6 +29,8 @@ production.
   enabled with care.
 * (bug 6092) Add expensive parser functions {{REVISIONID:}}, {{REVISIONUSER:}}
   and {{REVISIONTIMESTAMP:}} (with friends).
+* Add "wgRelevantUserName" to mw.config containing the current
+  Skin::getRelevantUser value
 
 === Bug fixes in 1.23 ===
 * (bug 41759) The "updated since last visit" markers (on history pages, recent
index 7f0454f..b4fda13 100644 (file)
@@ -2980,9 +2980,11 @@ $templates
                $ns = $title->getNamespace();
                $canonicalNamespace = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $title->getNsText();
 
+               $sk = $this->getSkin();
                // Get the relevant title so that AJAX features can use the correct page name
                // when making API requests from certain special pages (bug 34972).
-               $relevantTitle = $this->getSkin()->getRelevantTitle();
+               $relevantTitle = $sk->getRelevantTitle();
+               $relevantUser = $sk->getRelevantUser();
 
                if ( $ns == NS_SPECIAL ) {
                        list( $canonicalSpecialPageName, /*...*/ ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
@@ -3059,6 +3061,9 @@ $templates
                if ( $this->mRedirectedFrom ) {
                        $vars['wgRedirectedFrom'] = $this->mRedirectedFrom->getPrefixedDBkey();
                }
+               if ( $relevantUser ) {
+                       $vars['wgRelevantUserName'] = $relevantUser->getName();
+               }
 
                // Allow extensions to add their custom variables to the mw.config map.
                // Use the 'ResourceLoaderGetConfigVars' hook if the variable is not