Merge "Also add mw-content-{ltr,rtl} on page views for missing pages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 30 Apr 2015 21:10:30 +0000 (21:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 30 Apr 2015 21:10:30 +0000 (21:10 +0000)
includes/skins/SkinTemplate.php

index 61aad92..5364719 100644 (file)
@@ -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();