X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fcache%2FMessageCache.php;h=c9615b1335bc38c1adaf64c2d04b2dbcf2997f83;hb=04f94a57ad6076684f186bb7242751607c842283;hp=20cf64ce0cec61543b0a74f8e673b5b201a9e0e6;hpb=d1189161eb2b91d4fc29b20f4c004fd9f13c9739;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 20cf64ce0c..c9615b1335 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -156,22 +156,22 @@ class MessageCache { } /** - * @param WANObjectCache $wanCache WAN cache instance - * @param BagOStuff $clusterCache Cluster cache instance - * @param BagOStuff $srvCache Server cache instance + * @param WANObjectCache $wanCache + * @param BagOStuff $clusterCache + * @param BagOStuff $serverCache * @param bool $useDB Whether to look for message overrides (e.g. MediaWiki: pages) * @param int $expiry Lifetime for cache. @see $mExpiry. */ public function __construct( WANObjectCache $wanCache, BagOStuff $clusterCache, - BagOStuff $srvCache, + BagOStuff $serverCache, $useDB, $expiry ) { $this->wanCache = $wanCache; $this->clusterCache = $clusterCache; - $this->srvCache = $srvCache; + $this->srvCache = $serverCache; $this->mDisable = !$useDB; $this->mExpiry = $expiry; @@ -187,7 +187,7 @@ class MessageCache { if ( !$this->mParserOptions ) { if ( !$wgUser->isSafeToLoad() ) { - // $wgUser isn't loaded yet, so don't try to get a + // $wgUser isn't unstubbable 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 $lang Preferred language + * @param Language|StubObject $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 $lang Preferred language + * @param Language|StubObject $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 @@ -1048,8 +1048,7 @@ class MessageCache { if ( $titleObj->getLatestRevID() ) { $revision = Revision::newKnownCurrent( $dbr, - $titleObj->getArticleID(), - $titleObj->getLatestRevID() + $titleObj ); } else { $revision = false; @@ -1127,7 +1126,7 @@ class MessageCache { $wgParser->firstCallInit(); # Clone it and store it $class = $wgParserConf['class']; - if ( $class == 'ParserDiffTest' ) { + if ( $class == ParserDiffTest::class ) { # Uncloneable $this->mParser = new $class( $wgParserConf ); } else {