From: Chad Horohoe Date: Tue, 3 Oct 2017 22:50:12 +0000 (-0700) Subject: Remove some remaining mentions of unstubbing from core X-Git-Tag: 1.31.0-rc.0~1883 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=0f91e75c20e040f0e688fb05654ba7797afcff76;p=lhc%2Fweb%2Fwiklou.git Remove some remaining mentions of unstubbing from core Change-Id: Ife34335db7afd9bd4f0936cb90be227d7c4c9651 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 5d9006a731..785641d1a6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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(); diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 80aeff5478..9dd670ac8c 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -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 diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 768f980b26..20cf64ce0c 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -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 diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index c7146a1306..ee0da2a3ef 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -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 ) {