Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/207972

Change subject: Also add mw-content-{ltr,rtl} on page views for missing pages
......................................................................

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
---
M includes/skins/SkinTemplate.php
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/207972/1

diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 61aad92..5364719 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -422,11 +422,9 @@
 
                # 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();

-- 
To view, visit https://gerrit.wikimedia.org/r/207972
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib790498ff102f9d9b01aac3b8551c4829f964b7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to