(bug 5544) Fix redirect arrow in Special:Listredirects for right-to-left languages
authorRob Church <robchurch@users.mediawiki.org>
Tue, 11 Apr 2006 20:46:09 +0000 (20:46 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 11 Apr 2006 20:46:09 +0000 (20:46 +0000)
RELEASE-NOTES
includes/SpecialListredirects.php

index 2857c84..172a0a1 100644 (file)
@@ -47,7 +47,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Deactivated by default, set "$wgAllowDisplayTitle = true" in LocalSettings.php to activate
 * Cleaned SpecialContributions a bit
 * Added a table to track interlanguage links
-* Even further additions to Hebrew localisation
+* (bug 5544) Fix redirect arrow in Special:Listredirects for right-to-left languages
 
 == Compatibility ==
 
index 804df55..729de43 100644 (file)
@@ -31,6 +31,8 @@ class ListredirectsPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
+               global $wgContLang;
+       
                # Make a link to the redirect itself
                $rd_title = Title::makeTitle( $result->namespace, $result->title );
                $rd_link = $skin->makeKnownLinkObj( $rd_title, '', 'redirect=no' );
@@ -51,8 +53,11 @@ class ListredirectsPage extends QueryPage {
                        $targetLink = '*';
                }
 
+               # Check the language; RTL wikis need a &larr;
+               $arr = $wgContLang->isRTL() ? ' &larr; ' : ' &rarr; ';
+
                # Format the whole thing and return it
-               return( $rd_link . ' &rarr; ' . $targetLink );
+               return( $rd_link . $arr . $targetLink );
 
        }