Add variant conversion to the output of these special pages
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Thu, 21 Oct 2004 03:36:19 +0000 (03:36 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Thu, 21 Oct 2004 03:36:19 +0000 (03:36 +0000)
includes/QueryPage.php
includes/SpecialAncientpages.php
includes/SpecialPopularpages.php
includes/SpecialShortpages.php

index 8b75eca..2a697fd 100644 (file)
@@ -301,8 +301,9 @@ class QueryPage {
 class PageQueryPage extends QueryPage {
 
        function formatResult( $skin, $result ) {
+               global $wgContLang;
                $nt = Title::makeTitle( $result->namespace, $result->title );
-               return $skin->makeKnownLinkObj( $nt, '' );
+               return $skin->makeKnownLinkObj( $nt, $wgContLang->convert( $result->title ) );
        }
 }
 
index 3b055b8..60a42fa 100644 (file)
@@ -43,10 +43,10 @@ class AncientPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang;
+               global $wgLang, $wgContLang;
 
                $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
-               $link = $skin->makeKnownLink( $result->title, "" );
+               $link = $skin->makeKnownLink( $result->title, $wgContLang->convert( $result->title) );
                return "{$link} ({$d})";
        }
 }
index 39fc4c6..640d788 100644 (file)
@@ -40,8 +40,8 @@ class PopularPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang;
-               $link = $skin->makeKnownLink( $result->title, "" );
+               global $wgLang, $wgContLang;
+               $link = $skin->makeKnownLink( $result->title, $wgContLang->convert( $result->title ) );
                $nv = wfMsg( "nviews", $wgLang->formatNum( $result->value ) );
                return "{$link} ({$nv})";
        }
index 01fe45f..c854e55 100644 (file)
@@ -45,9 +45,9 @@ class ShortPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang;
+               global $wgLang, $wgContLang;
                $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->value ) );
-               $link = $skin->makeKnownLink( $result->title, "" );
+               $link = $skin->makeKnownLink( $result->title, $wgContLang->convert( $result->title ) );
                return "{$link} ({$nb})";
        }
 }