TheDJ has uploaded a new change for review.

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

Change subject: Add mw-content-ltr|rtl to file redirect pages
......................................................................

Add mw-content-ltr|rtl to file redirect pages

As a side effect, this also makes the redirect arrows visible on File
redirect pages, because their CSS depends on these classes.

Bug: T60955
Change-Id: I6b14c17a4b74ff5964ea61554aa3afb197d206bf
---
M includes/skins/SkinTemplate.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/266582/1

diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 1328870..98f7666 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -433,7 +433,8 @@
                # 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(), array( NS_SPECIAL, 
NS_FILE ) ) &&
+               if ( ( $this->getWikiPage() instanceof WikiFilePage || // File 
namespace can also show redirects
+                       $title->getNamespace() === NS_SPECIAL ) &&
                        Action::getActionName( $this ) === 'view' ) {
                        $pageLang = $title->getPageViewLanguage();
                        $realBodyAttribs['lang'] = $pageLang->getHtmlCode();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b14c17a4b74ff5964ea61554aa3afb197d206bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to