X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=b05fb0bcd9e0f172cba3ae6293b841110bbc01cf;hb=33afb7440a03df8d1878c94d2f3d3b9fdd1a848b;hp=83d02a0fdd8f34831f546a6d182cee3c7ccc3f16;hpb=6c2a31bbf5b2cf8cfcbd4f9df382217d69b5e18f;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index 83d02a0fdd..b05fb0bcd9 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -449,7 +449,8 @@ abstract class Skin extends ContextSource {
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 {
@@ -532,7 +533,7 @@ abstract class Skin extends ContextSource {
$t = $embed . implode( "{$pop}{$embed}", $allCats['normal'] ) . $pop;
$msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
- $linkPage = wfMessage( 'pagecategorieslink' )->inContentLanguage()->text();
+ $linkPage = $this->msg( 'pagecategorieslink' )->inContentLanguage()->text();
$title = Title::newFromText( $linkPage );
$link = $title ? Linker::link( $title, $msg ) : $msg;
$s .= '
' .
@@ -1330,7 +1331,7 @@ abstract class Skin extends ContextSource {
* @param string $message
*/
public function addToSidebar( &$bar, $message ) {
- $this->addToSidebarPlain( $bar, wfMessage( $message )->inContentLanguage()->plain() );
+ $this->addToSidebarPlain( $bar, $this->msg( $message )->inContentLanguage()->plain() );
}
/**
@@ -1471,7 +1472,7 @@ abstract class Skin extends ContextSource {
$uTalkTitle,
$this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(),
[],
- [ 'redirect' => 'no' ]
+ $uTalkTitle->isRedirect() ? [ 'redirect' => 'no' ] : []
);
$newMessagesDiffLink = Linker::linkKnown(
@@ -1547,7 +1548,8 @@ abstract class Skin extends ContextSource {
$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
@@ -1559,7 +1561,7 @@ abstract class Skin extends ContextSource {
}
);
- $contLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $contLang = $services->getContentLanguage();
return Html::rawElement(
'div',
[
@@ -1619,13 +1621,13 @@ abstract class Skin extends ContextSource {
$attribs = [];
if ( !is_null( $tooltip ) ) {
- $attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
+ $attribs['title'] = $this->msg( 'editsectionhint' )->rawParams( $tooltip )
->inLanguage( $lang )->text();
}
$links = [
'editsection' => [
- 'text' => wfMessage( 'editsection' )->inLanguage( $lang )->escaped(),
+ 'text' => $this->msg( 'editsection' )->inLanguage( $lang )->escaped(),
'targetTitle' => $nt,
'attribs' => $attribs,
'query' => [ 'action' => 'edit', 'section' => $section ],
@@ -1650,7 +1652,7 @@ abstract class Skin extends ContextSource {
$result .= implode(
''
- . wfMessage( 'pipe-separator' )->inLanguage( $lang )->escaped()
+ . $this->msg( 'pipe-separator' )->inLanguage( $lang )->escaped()
. '',
$linksHtml
);