* Removed messages in English, they'll be inherited from the parent.
[lhc/web/wiklou.git] / includes / SpecialAncientpages.php
1 <?php
2 /**
3 *
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
7
8 /**
9 *
10 */
11 require_once( 'QueryPage.php' );
12
13 /**
14 *
15 * @package MediaWiki
16 * @subpackage SpecialPage
17 */
18 class AncientPagesPage extends QueryPage {
19
20 function getName() {
21 return "Ancientpages";
22 }
23
24 function isExpensive() {
25 return parent::isExpensive() ;
26 }
27
28 function isSyndicated() { return false; }
29
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";
43 }
44
45 function sortDescending() {
46 return false;
47 }
48
49 function formatResult( $skin, $result ) {
50 global $wgLang, $wgContLang;
51
52 $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
53 $link = $skin->makeKnownLink( $result->title, $wgContLang->convert( $result->title) );
54 return "{$link} ({$d})";
55 }
56 }
57
58 function wfSpecialAncientpages() {
59 list( $limit, $offset ) = wfCheckLimits();
60
61 $app = new AncientPagesPage();
62
63 $app->doQuery( $offset, $limit );
64 }
65
66 ?>