Remove some remaining mentions of unstubbing from core
authorChad Horohoe <chadh@wikimedia.org>
Tue, 3 Oct 2017 22:50:12 +0000 (15:50 -0700)
committerChad <chadh@wikimedia.org>
Tue, 3 Oct 2017 23:01:43 +0000 (23:01 +0000)
Change-Id: Ife34335db7afd9bd4f0936cb90be227d7c4c9651

includes/OutputPage.php
includes/api/ApiBase.php
includes/cache/MessageCache.php
includes/parser/ParserOptions.php

index 5d9006a..785641d 100644 (file)
@@ -1596,7 +1596,7 @@ class OutputPage extends ContextSource {
 
                if ( !$this->mParserOptions ) {
                        if ( !$this->getContext()->getUser()->isSafeToLoad() ) {
-                               // $wgUser isn't unstubbable yet, so don't try to get a
+                               // $wgUser isn't loaded yet, so don't try to get a
                                // ParserOptions for it. And don't cache this ParserOptions
                                // either.
                                $po = ParserOptions::newFromAnon();
index 80aeff5..9dd670a 100644 (file)
@@ -1385,7 +1385,7 @@ abstract class ApiBase extends ContextSource {
                $limit2 = $limit2 ?: self::LIMIT_SML2;
 
                // This is a bit awkward, but we want to avoid calling canApiHighLimits()
-               // because it unstubs $wgUser
+               // because it loads the user object
                $valuesList = $this->explodeMultiValue( $value, $limit2 + 1 );
                $sizeLimit = count( $valuesList ) > $limit1 && $this->mMainModule->canApiHighLimits()
                        ? $limit2
index 768f980..20cf64c 100644 (file)
@@ -187,7 +187,7 @@ class MessageCache {
 
                if ( !$this->mParserOptions ) {
                        if ( !$wgUser->isSafeToLoad() ) {
-                               // $wgUser isn't unstubbable yet, so don't try to get a
+                               // $wgUser isn't loaded yet, so don't try to get a
                                // ParserOptions for it. And don't cache this ParserOptions
                                // either.
                                $po = ParserOptions::newFromAnon();
@@ -874,7 +874,7 @@ class MessageCache {
         * the site language.
         *
         * @see MessageCache::get
-        * @param Language|StubObject $lang Preferred language
+        * @param Language $lang Preferred language
         * @param string $lckey Lowercase key for the message (as for localisation cache)
         * @param bool $useDB Whether to include messages from the wiki database
         * @return string|bool The message, or false if not found
@@ -899,7 +899,7 @@ class MessageCache {
         * Given a language, try and fetch messages from that language and its fallbacks.
         *
         * @see MessageCache::get
-        * @param Language|StubObject $lang Preferred language
+        * @param Language $lang Preferred language
         * @param string $lckey Lowercase key for the message (as for localisation cache)
         * @param bool $useDB Whether to include messages from the wiki database
         * @param bool[] $alreadyTried Contains true for each language that has been tried already
index c7146a1..ee0da2a 100644 (file)
@@ -944,9 +944,6 @@ class ParserOptions {
                }
                if ( $lang === null ) {
                        global $wgLang;
-                       if ( !StubObject::isRealObject( $wgLang ) ) {
-                               $wgLang->_unstub();
-                       }
                        $lang = $wgLang;
                }
                $this->initialiseFromUser( $user, $lang );
@@ -1014,7 +1011,7 @@ class ParserOptions {
         *
         * @since 1.30
         * @param User|null $user
-        * @param Language|StubObject|null $lang
+        * @param Language|null $lang
         * @return ParserOptions
         */
        public static function newCanonical( User $user = null, $lang = null ) {