X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fskins%2FSkinTemplate.php;h=f49d46c2fd6f64f9760f8f7927056958dde8b41e;hp=780fac4964ec5f720054c857b129325ec758867d;hb=89539f2aa1b158fdcc703ad053e2580cb97a6385;hpb=3d6e6cd952e640bd112f6871e64772df8b06e6ee diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 780fac4964..f49d46c2fd 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -269,11 +269,13 @@ class SkinTemplate extends Skin { # An ID that includes the actual body text; without categories, contentSub, ... $realBodyAttribs = [ 'id' => 'mw-content-text' ]; - # Add a mw-content-ltr/rtl class to be able to style based on text direction - # when the content is different from the UI language, i.e.: - # not for special pages or file pages AND only when viewing - if ( !in_array( $title->getNamespace(), [ NS_SPECIAL, NS_FILE ] ) && - Action::getActionName( $this ) === 'view' ) { + # Add a mw-content-ltr/rtl class to be able to style based on text + # direction when the content is different from the UI language (only + # when viewing) + # Most information on special pages and file pages is in user language, + # rather than content language, so those will not get this + if ( Action::getActionName( $this ) === 'view' && + ( !$title->inNamespaces( NS_SPECIAL, NS_FILE ) || $title->isRedirect() ) ) { $pageLang = $title->getPageViewLanguage(); $realBodyAttribs['lang'] = $pageLang->getHtmlCode(); $realBodyAttribs['dir'] = $pageLang->getDir(); @@ -344,7 +346,7 @@ class SkinTemplate extends Skin { $tpl->set( 'charset', 'UTF-8' ); $tpl->setRef( 'wgScript', $wgScript ); $tpl->setRef( 'skinname', $this->skinname ); - $tpl->set( 'skinclass', get_class( $this ) ); + $tpl->set( 'skinclass', static::class ); $tpl->setRef( 'skin', $this ); $tpl->setRef( 'stylename', $this->stylename ); $tpl->set( 'printable', $out->isPrintable() ); @@ -720,7 +722,10 @@ class SkinTemplate extends Skin { } if ( $authManager->canAuthenticateNow() ) { - $personal_urls['login'] = $login_url; + $key = User::groupHasPermission( '*', 'read' ) + ? 'login' + : 'login-private'; + $personal_urls[$key] = $login_url; } }