X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fcache%2FMessageCache.php;h=d5ff6cbc9ade9cec0a89ae3a6546c532ef8e81fa;hb=220bda9175a18458449e9d754fb48830c1f76f25;hp=d6e9b748ab06bfc9f641be37ae189ff20f7b8378;hpb=918fee715de966760522725b28ab1c757b6cee46;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index d6e9b748ab..d5ff6cbc9a 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; @@ -191,23 +191,15 @@ class MessageCache { // ParserOptions for it. And don't cache this ParserOptions // either. $po = ParserOptions::newFromAnon(); - $po->setEditSection( false ); $po->setAllowUnsafeRawHtml( false ); - $po->setWrapOutputClass( false ); return $po; } $this->mParserOptions = new ParserOptions; - $this->mParserOptions->setEditSection( false ); // Messages may take parameters that could come // from malicious sources. As a precaution, disable // the parser tag when parsing messages. $this->mParserOptions->setAllowUnsafeRawHtml( false ); - // Wrapping messages in an extra
is probably not expected. If - // they're outside the content area they probably shouldn't be - // targeted by CSS that's targeting the parser output, and if - // they're inside they already are from the outer div. - $this->mParserOptions->setWrapOutputClass( false ); } return $this->mParserOptions; @@ -1126,7 +1118,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 {