$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;
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
* 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 ) {