Changing comments layout preparing for generated documentation with Phpdocumentor
[lhc/web/wiklou.git] / includes / SpecialAncientpages.php
1 <?php
2 /**
3 *
4 */
5
6 /**
7 *
8 */
9 require_once( 'QueryPage.php' );
10
11 /**
12 *
13 */
14 class AncientPagesPage extends QueryPage {
15
16 function getName() {
17 return "Ancientpages";
18 }
19
20 function isExpensive() {
21 return parent::isExpensive() ;
22 }
23
24 function getSQL() {
25 $db =& wfGetDB( DB_SLAVE );
26 $cur = $db->tableName( 'cur' );
27 $use_index = $db->useIndexClause( 'cur_timestamp' );
28 return
29 "SELECT 'Ancientpages' as type,
30 cur_namespace as namespace,
31 cur_title as title,
32 UNIX_TIMESTAMP(cur_timestamp) as value
33 FROM $cur $use_index
34 WHERE cur_namespace=0 AND cur_is_redirect=0";
35 }
36
37 function sortDescending() {
38 return false;
39 }
40
41 function formatResult( $skin, $result ) {
42 global $wgLang;
43
44 $d = $wgLang->timeanddate( wfUnix2Timestamp( $result->value ), true );
45 $link = $skin->makeKnownLink( $result->title, "" );
46 return "{$link} ({$d})";
47 }
48 }
49
50 function wfSpecialAncientpages() {
51 list( $limit, $offset ) = wfCheckLimits();
52
53 $app = new AncientPagesPage();
54
55 $app->doQuery( $offset, $limit );
56 }
57
58 ?>