5 * @subpackage SpecialPage
11 require_once( 'QueryPage.php' );
16 * @subpackage SpecialPage
18 class AncientPagesPage
extends QueryPage
{
21 return "Ancientpages";
24 function isExpensive() {
25 return parent
::isExpensive() ;
28 function isSyndicated() { return false; }
31 $db =& wfGetDB( DB_SLAVE
);
32 $page = $db->tableName( 'page' );
33 $revision = $db->tableName( 'revision' );
34 #$use_index = $db->useIndexClause( 'cur_timestamp' ); # FIXME! this is gone
36 "SELECT 'Ancientpages' as type,
37 page_namespace as namespace,
39 rev_timestamp as value
41 WHERE page_namespace=".NS_MAIN
." AND page_is_redirect=0
42 AND page_latest=rev_id";
45 function sortDescending() {
49 function formatResult( $skin, $result ) {
50 global $wgLang, $wgContLang;
52 $d = $wgLang->timeanddate( wfTimestamp( TS_MW
, $result->value
), true );
53 $link = $skin->makeKnownLink( $result->title
, $wgContLang->convert( $result->title
) );
54 return "{$link} ({$d})";
58 function wfSpecialAncientpages() {
59 list( $limit, $offset ) = wfCheckLimits();
61 $app = new AncientPagesPage();
63 $app->doQuery( $offset, $limit );