5 * @subpackage SpecialPage
11 require_once( 'QueryPage.php' );
16 * @subpackage SpecialPage
18 class AncientPagesPage
extends QueryPage
{
21 return "Ancientpages";
24 function isExpensive() {
28 function isSyndicated() { return false; }
32 $db =& wfGetDB( DB_SLAVE
);
33 $page = $db->tableName( 'page' );
34 $revision = $db->tableName( 'revision' );
35 #$use_index = $db->useIndexClause( 'cur_timestamp' ); # FIXME! this is gone
36 $epoch = $wgDBtype == 'mysql' ?
'UNIX_TIMESTAMP(rev_timestamp)' :
37 'EXTRACT(epoch FROM rev_timestamp)';
39 "SELECT 'Ancientpages' as type,
40 page_namespace as namespace,
44 WHERE page_namespace=".NS_MAIN
." AND page_is_redirect=0
45 AND page_latest=rev_id";
48 function sortDescending() {
52 function formatResult( $skin, $result ) {
53 global $wgLang, $wgContLang;
55 $d = $wgLang->timeanddate( wfTimestamp( TS_MW
, $result->value
), true );
56 $title = Title
::makeTitle( $result->namespace, $result->title
);
57 $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
58 return wfSpecialList($link, $d);
62 function wfSpecialAncientpages() {
63 list( $limit, $offset ) = wfCheckLimits();
65 $app = new AncientPagesPage();
67 $app->doQuery( $offset, $limit );