4 * @addtogroup SpecialPage
8 * Implements Special:Ancientpages
9 * @addtogroup SpecialPage
11 class AncientPagesPage
extends QueryPage
{
14 return "Ancientpages";
17 function isExpensive() {
21 function isSyndicated() { return false; }
25 $db = wfGetDB( DB_SLAVE
);
26 $page = $db->tableName( 'page' );
27 $revision = $db->tableName( 'revision' );
28 #$use_index = $db->useIndexClause( 'cur_timestamp' ); # FIXME! this is gone
29 $epoch = $wgDBtype == 'mysql' ?
'UNIX_TIMESTAMP(rev_timestamp)' :
30 'EXTRACT(epoch FROM rev_timestamp)';
32 "SELECT 'Ancientpages' as type,
33 page_namespace as namespace,
37 WHERE page_namespace=".NS_MAIN
." AND page_is_redirect=0
38 AND page_latest=rev_id";
41 function sortDescending() {
45 function formatResult( $skin, $result ) {
46 global $wgLang, $wgContLang;
48 $d = $wgLang->timeanddate( wfTimestamp( TS_MW
, $result->value
), true );
49 $title = Title
::makeTitle( $result->namespace, $result->title
);
50 $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
51 return wfSpecialList($link, $d);
55 function wfSpecialAncientpages() {
56 list( $limit, $offset ) = wfCheckLimits();
58 $app = new AncientPagesPage();
60 $app->doQuery( $offset, $limit );