From d14181afe1c0d516320ba7bf498560f7d5fde24f Mon Sep 17 00:00:00 2001 From: Zheng Zhu Date: Thu, 21 Oct 2004 03:36:19 +0000 Subject: [PATCH] Add variant conversion to the output of these special pages --- includes/QueryPage.php | 3 ++- includes/SpecialAncientpages.php | 4 ++-- includes/SpecialPopularpages.php | 4 ++-- includes/SpecialShortpages.php | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 8b75ecac8e..2a697fdc93 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -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 ) ); } } diff --git a/includes/SpecialAncientpages.php b/includes/SpecialAncientpages.php index 3b055b8c2a..60a42fa959 100644 --- a/includes/SpecialAncientpages.php +++ b/includes/SpecialAncientpages.php @@ -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})"; } } diff --git a/includes/SpecialPopularpages.php b/includes/SpecialPopularpages.php index 39fc4c6841..640d7889f0 100644 --- a/includes/SpecialPopularpages.php +++ b/includes/SpecialPopularpages.php @@ -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})"; } diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index 01fe45f8d7..c854e55104 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -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})"; } } -- 2.20.1