* Correct direction for special pages
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 31 May 2006 19:08:17 +0000 (19:08 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 31 May 2006 19:08:17 +0000 (19:08 +0000)
includes/GlobalFunctions.php
includes/SpecialImagelist.php
includes/SpecialNewpages.php
includes/SpecialShortpages.php
includes/SpecialUnusedimages.php

index 389a797..992499b 100644 (file)
@@ -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 = "<span" . contentdir() . ">$page</span>";
+       }
+       $details = $details ? ' ' . $wgLang->getDirMark() . "($details)" : "";
        return $page . $details;
 }
 
index b797216..f9b0ca3 100644 (file)
@@ -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 = "<a href=\"" . htmlspecialchars( Image::imageUrl( $name ) ) .
                  "\">" . strtr(htmlspecialchars( $name ), '_', ' ') . "</a>";
index 3f72352..cc1a221 100644 (file)
@@ -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 ) );
index 5381e2f..b4ca18a 100644 (file)
@@ -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})";
        }
index fa76c57..380e100 100644 (file)
@@ -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