Made strong/em handling more forgiving against unbalanced ticks
[lhc/web/wiklou.git] / includes / SpecialAncientpages.php
1 <?php
2
3 require_once( "QueryPage.php" );
4
5 class AncientPagesPage extends QueryPage {
6
7 function getName() {
8 return "Ancientpages";
9 }
10
11 function isExpensive() {
12 return parent::isExpensive() ;
13 }
14
15 function getSQL() {
16 return
17 "SELECT 'Ancientpages' as type,
18 cur_namespace as namespace,
19 cur_title as title,
20 UNIX_TIMESTAMP(cur_timestamp) as value
21 FROM cur USE INDEX (cur_timestamp)
22 WHERE cur_namespace=0 AND cur_is_redirect=0";
23 }
24
25 function sortDescending() {
26 return false;
27 }
28
29 function formatResult( $skin, $result ) {
30 global $wgLang;
31
32 $d = $wgLang->timeanddate( wfUnix2Timestamp( $result->value ), true );
33 $link = $skin->makeKnownLink( $result->title, "" );
34 return "{$link} ({$d})";
35 }
36 }
37
38 function wfSpecialAncientpages()
39 {
40 list( $limit, $offset ) = wfCheckLimits();
41
42 $app = new AncientPagesPage();
43
44 $app->doQuery( $offset, $limit );
45 }
46
47 ?>