From 8f3ccf52f6f045e6299c5b29ab21fcc157dbd4c8 Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Mon, 11 Jul 2011 00:39:41 +0000 Subject: [PATCH] BetterDirectionality fixes: * SkinTemplate: also set
when action = historysubmit, so a diff displays correctly when you clicked on the "compare selected revisions" button on the history page * ImagePage: set a dir attribute (according to the site content language) for the user comment in the file history * FlaggedRevs: use CSS class sitedir-ltr/rtl instead of ambiguous rtl class --- includes/ImagePage.php | 9 ++++----- includes/SkinTemplate.php | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 6f7ad74c73..956977e07f 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -883,7 +883,7 @@ class ImageHistoryList { * @return string */ public function imageHistoryLine( $iscur, $file ) { - global $wgUser, $wgLang; + global $wgUser, $wgLang, $wgContLang; $timestamp = wfTimestamp( TS_MW, $file->getTimestamp() ); $img = $iscur ? $file->getName() : $file->getArchiveName(); @@ -1014,15 +1014,14 @@ class ImageHistoryList { $row .= htmlspecialchars( $usertext ); } } - $row .= ''; + $row .= ''; // Don't show deleted descriptions if ( $file->isDeleted( File::DELETED_COMMENT ) ) { - $row .= '' . wfMsgHtml( 'rev-deleted-comment' ) . ''; + $row .= '' . wfMsgHtml( 'rev-deleted-comment' ) . ''; } else { - $row .= Linker::commentBlock( $description, $this->title ); + $row .= '' . Linker::commentBlock( $description, $this->title ) . ''; } - $row .= ''; $rowClass = null; wfRunHooks( 'ImagePageFileHistoryLine', array( $this, $file, &$row, &$rowClass ) ); diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 8fef85f058..898a04838e 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -453,7 +453,7 @@ class SkinTemplate extends Skin { # 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) if( !in_array( $this->getTitle()->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) && - in_array( $action, array( 'view', 'render', 'print' ) ) && + in_array( $action, array( 'view', 'render', 'print', 'historysubmit' ) ) && ( $this->getTitle()->exists() || $this->getTitle()->getNamespace() == NS_MEDIAWIKI ) ) { $pageLang = $this->getTitle()->getPageLanguage(); $realBodyAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(), -- 2.20.1