From 558436ae2e323519d7d09950adbe1c458b72c46c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 31 May 2006 19:08:17 +0000 Subject: [PATCH] * Correct direction for special pages --- includes/GlobalFunctions.php | 8 ++++++-- includes/SpecialImagelist.php | 2 +- includes/SpecialNewpages.php | 2 +- includes/SpecialShortpages.php | 2 +- includes/SpecialUnusedimages.php | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 389a7973e0..992499bae2 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1634,8 +1634,12 @@ function in_string( $needle, $str ) { } function wfSpecialList( $page, $details ) { - global $wgContLang; - $details = $details ? ' ' . $wgContLang->getDirMark() . "($details)" : ""; + global $wgLang, $wgContLang; + + if ($wgLang->isRTL() != $wgContLang->isRTL()) { + $page = "$page"; + } + $details = $details ? ' ' . $wgLang->getDirMark() . "($details)" : ""; return $page . $details; } diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php index b7972166b6..f9b0ca3944 100644 --- a/includes/SpecialImagelist.php +++ b/includes/SpecialImagelist.php @@ -95,7 +95,7 @@ function wfSpecialImagelist() { $ul = $sk->makeLinkObj( Title::makeTitle( NS_USER, $ut ), $ut ); } - $dirmark = $wgContLang->getDirMark(); // to keep text in correct direction + $dirmark = $wgLang->getDirMark(); // to keep text in correct direction $ilink = "" . strtr(htmlspecialchars( $name ), '_', ' ') . ""; diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index 3f72352f61..cc1a22115d 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -75,7 +75,7 @@ class NewPagesPage extends QueryPage { global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol; $u = $result->user; $ut = $result->user_text; - $dirmark = $wgContLang->getDirMark(); // To keep text in correct order + $dirmark = $wgLang->getDirMark(); // To keep text in correct order $length = wfMsgExt( 'nbytes', array('parsemag', 'escape'), $wgLang->formatNum( $result->length ) ); diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index 5381e2f3a5..b4ca18ad59 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -58,7 +58,7 @@ class ShortPagesPage extends QueryPage { $title = Title::makeTitle( $result->namespace, $result->title ); $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); $histlink = $skin->makeKnownLinkObj( $title, wfMsgHtml('hist'), 'action=history' ); - $dirmark = $wgContLang->getDirMark(); + $dirmark = $wgLang->getDirMark(); return "({$histlink}) {$dirmark}$link {$dirmark}({$nb})"; } diff --git a/includes/SpecialUnusedimages.php b/includes/SpecialUnusedimages.php index fa76c57dbb..380e1004fe 100644 --- a/includes/SpecialUnusedimages.php +++ b/includes/SpecialUnusedimages.php @@ -48,7 +48,7 @@ class UnusedimagesPage extends QueryPage { $title = Title::makeTitle( NS_IMAGE, $result->title ); $imageUrl = htmlspecialchars( Image::imageUrl( $result->title ) ); - $dirmark = $wgContLang->getDirMark(); // To keep text in correct order + $dirmark = $wgLang->getDirMark(); // To keep text in correct order $return = # The 'desc' linking to the image page -- 2.20.1