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