From: Niklas Laxström Date: Wed, 31 May 2006 19:08:17 +0000 (+0000) Subject: * Correct direction for special pages X-Git-Tag: 1.31.0-rc.0~56949 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=558436ae2e323519d7d09950adbe1c458b72c46c;p=lhc%2Fweb%2Fwiklou.git * Correct direction for special pages --- 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