if ( $out->isTOCEnabled() ) {
$modules['content'][] = 'mediawiki.toc';
+ $modules['styles']['content'][] = 'mediawiki.toc.styles';
}
// Add various resources if required
* @param string|null $nonce OutputPage::getCSPNonce()
* @return string|WrappedString HTML
*/
- static function makeVariablesScript( $data, $nonce = null ) {
+ public static function makeVariablesScript( $data, $nonce = null ) {
if ( $data ) {
return ResourceLoader::makeInlineScript(
ResourceLoader::makeConfigSetScript( $data ),
$nonce
);
- } else {
- return '';
}
+ return '';
}
/**
[
'checkKeys' => [
// Unless there is both no exact $code override nor an i18n definition
- // in the the software, the only MediaWiki page to check is for $code.
+ // in the software, the only MediaWiki page to check is for $code.
$msgCache->getCheckKey( $this->getLanguage()->getCode() )
],
'lockTSE' => 30
* should fall back to the next notice in its sequence
*/
private function getCachedNotice( $name ) {
- global $wgRenderHashAppend, $wgContLang;
+ global $wgRenderHashAppend;
$needParse = false;
}
);
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
return Html::rawElement(
'div',
[
'id' => 'localNotice',
- 'lang' => $wgContLang->getHtmlCode(),
- 'dir' => $wgContLang->getDir()
+ 'lang' => $contLang->getHtmlCode(),
+ 'dir' => $contLang->getDir()
],
$parsed
);