Tell regexp parser to use extra analysis on external link regexp;
[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 $cur = $db->tableName( 'cur' );
33 $use_index = $db->useIndexClause( 'cur_timestamp' );
34 return
35 "SELECT 'Ancientpages' as type,
36 cur_namespace as namespace,
37 cur_title as title,
38 cur_timestamp as value
39 FROM $cur $use_index
40 WHERE cur_namespace=0 AND cur_is_redirect=0";
41 }
42
43 function sortDescending() {
44 return false;
45 }
46
47 function formatResult( $skin, $result ) {
48 global $wgLang, $wgContLang;
49
50 $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
51 $link = $skin->makeKnownLink( $result->title, $wgContLang->convert( $result->title) );
52 return "{$link} ({$d})";
53 }
54 }
55
56 function wfSpecialAncientpages() {
57 list( $limit, $offset ) = wfCheckLimits();
58
59 $app = new AncientPagesPage();
60
61 $app->doQuery( $offset, $limit );
62 }
63
64 ?>