* Fixed some phpdoc errors, see http://wikipedia.sf.net/doc/errors.html
[mediawiki.git] / includes / SpecialAncientpages.php
blob991fed3a2891e5730dff08108a4c613d3491150a
1 <?php
2 /**
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
8 /**
11 require_once( 'QueryPage.php' );
13 /**
15 * @package MediaWiki
16 * @subpackage SpecialPage
18 class AncientPagesPage extends QueryPage {
20 function getName() {
21 return "Ancientpages";
24 function isExpensive() {
25 return parent::isExpensive() ;
28 function isSyndicated() { return false; }
30 function getSQL() {
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
35 return
36 "SELECT 'Ancientpages' as type,
37 page_namespace as namespace,
38 page_title as title,
39 UNIX_TIMESTAMP(rev_timestamp) as value
40 FROM $page, $revision
41 WHERE page_namespace=".NS_MAIN." AND page_is_redirect=0
42 AND page_latest=rev_id";
45 function sortDescending() {
46 return false;
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 );