X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialAncientpages.php;h=91bd54376549b7c50809276630b5bb9989bf4685;hb=ba6b4c048e434ddc495e96976a9f12aea208449c;hp=aadf79b0e8bddb3c74c78daed79dff12164bbbaa;hpb=b0f510df565d206379d543efdc2b7550d4585107;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialAncientpages.php b/includes/SpecialAncientpages.php index aadf79b0e8..91bd543765 100644 --- a/includes/SpecialAncientpages.php +++ b/includes/SpecialAncientpages.php @@ -1,7 +1,20 @@ -tableName( 'cur' ); + $use_index = $db->useIndexClause( 'cur_timestamp' ); + return + "SELECT 'Ancientpages' as type, + cur_namespace as namespace, + cur_title as title, + cur_timestamp as value + FROM $cur $use_index + WHERE cur_namespace=0 AND cur_is_redirect=0"; + } + + function sortDescending() { + return false; } function formatResult( $skin, $result ) { global $wgLang; - $d = $wgLang->timeanddate( $result->cur_timestamp, true ); - $link = $skin->makeKnownLink( $result->cur_title, "" ); + $d = $wgLang->timeanddate( wfTimestamp( $result->value ), true ); + $link = $skin->makeKnownLink( $result->title, "" ); return "{$link} ({$d})"; } } -function wfSpecialAncientpages() -{ +function wfSpecialAncientpages() { list( $limit, $offset ) = wfCheckLimits(); $app = new AncientPagesPage();