From: Roan Kattouw Date: Thu, 30 Apr 2015 20:33:29 +0000 (-0700) Subject: Also add mw-content-{ltr,rtl} on page views for missing pages X-Git-Tag: 1.31.0-rc.0~11399^2~2 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=ee320648fd139022ba0e0427a0fd0253a119998f;p=lhc%2Fweb%2Fwiklou.git Also add mw-content-{ltr,rtl} on page views for missing pages So that noarticletext or whatever might render there has this class applied. For some reason, this was explicitly bypassed for missing pages, but there was no explanation why. Bug: T97624 Change-Id: Ib790498ff102f9d9b01aac3b8551c4829f964b7d --- diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 61aad92112..5364719e29 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -422,11 +422,9 @@ class SkinTemplate extends Skin { # 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 AND if the page exists - # (or is in MW namespace, because that has default content) + # not for special pages or file pages AND only when viewing if ( !in_array( $title->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) && - Action::getActionName( $this ) === 'view' && - ( $title->exists() || $title->getNamespace() == NS_MEDIAWIKI ) ) { + Action::getActionName( $this ) === 'view' ) { $pageLang = $title->getPageViewLanguage(); $realBodyAttribs['lang'] = $pageLang->getHtmlCode(); $realBodyAttribs['dir'] = $pageLang->getDir();