if ( $title->isSpecialPage() ) {
$type = 'ns-special';
// T25315: provide a class based on the canonical special page name without subpages
- list( $canonicalName ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
+ list( $canonicalName ) = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+ resolveAlias( $title->getDBkey() );
if ( $canonicalName ) {
$type .= ' ' . Sanitizer::escapeClass( "mw-special-$canonicalName" );
} else {
$uTalkTitle,
$this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(),
[],
- [ 'redirect' => 'no' ]
+ $uTalkTitle->isRedirect() ? [ 'redirect' => 'no' ] : []
);
$newMessagesDiffLink = Linker::linkKnown(
$notice = $msg->plain();
}
- $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $services = MediaWikiServices::getInstance();
+ $cache = $services->getMainWANObjectCache();
$parsed = $cache->getWithSetCallback(
// Use the extra hash appender to let eg SSL variants separately cache
// Key is verified with md5 hash of unparsed wikitext
}
);
- $contLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $contLang = $services->getContentLanguage();
return Html::rawElement(
'div',
[