X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParserOutput.php;h=6260de6bc080635dcd874c7a457b3b04698c9a6a;hb=0833cae960f3360c1e2208122ed17dae08e24a90;hp=48ba111e8823198148c391728b063d6c9619b79d;hpb=36e1c72d0af6d26ff2d86eabd0cfa0f17b9658f8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 48ba111e88..6260de6bc0 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -325,7 +325,6 @@ class ParserOutput extends CacheTime { $text = preg_replace_callback( self::EDITSECTION_REGEX, function ( $m ) { - global $wgOut, $wgLang; $editsectionPage = Title::newFromText( htmlspecialchars_decode( $m[1] ) ); $editsectionSection = htmlspecialchars_decode( $m[2] ); $editsectionContent = isset( $m[4] ) ? Sanitizer::decodeCharReferences( $m[3] ) : null; @@ -334,11 +333,12 @@ class ParserOutput extends CacheTime { throw new MWException( "Bad parser output text." ); } - $skin = $wgOut->getSkin(); - return $skin->doEditSectionLink( $editsectionPage, + $context = RequestContext::getMain(); + return $context->getSkin()->doEditSectionLink( + $editsectionPage, $editsectionSection, $editsectionContent, - $wgLang->getCode() + $context->getLanguage() ); }, $text @@ -1127,11 +1127,7 @@ class ParserOutput extends CacheTime { * or null if no value was set for this key. */ public function getExtensionData( $key ) { - if ( isset( $this->mExtensionData[$key] ) ) { - return $this->mExtensionData[$key]; - } - - return null; + return $this->mExtensionData[$key] ?? null; } private static function getTimes( $clock = null ) {