8 * Implements Special:Ancientpages
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 $epoch = $wgDBtype == 'mysql' ?
'UNIX_TIMESTAMP(rev_timestamp)' :
29 'EXTRACT(epoch FROM rev_timestamp)';
31 "SELECT 'Ancientpages' as type,
32 page_namespace as namespace,
36 WHERE page_namespace=".NS_MAIN
." AND page_is_redirect=0
37 AND page_latest=rev_id";
40 function sortDescending() {
44 function formatResult( $skin, $result ) {
45 global $wgLang, $wgContLang;
47 $d = $wgLang->timeanddate( wfTimestamp( TS_MW
, $result->value
), true );
48 $title = Title
::makeTitle( $result->namespace, $result->title
);
49 $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
50 return wfSpecialList($link, $d);
54 function wfSpecialAncientpages() {
55 list( $limit, $offset ) = wfCheckLimits();
57 $app = new AncientPagesPage();
59 $app->doQuery( $offset, $limit );