Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SpecialAncientpages.php

Go to the documentation of this file.
00001 <?php 00002 00003 require_once( "QueryPage.php" ); 00004 00005 class AncientPagesPage extends QueryPage { 00006 00007 function getName() { 00008 return "Ancientpages"; 00009 } 00010 00011 function isExpensive() { 00012 return parent::isExpensive() ; 00013 } 00014 00015 function getSQL() { 00016 global $wgIsMySQL; 00017 $use_index=$wgIsMySQL?"USE INDEX (cur_timestamp)":""; 00018 return 00019 "SELECT 'Ancientpages' as type, 00020 cur_namespace as namespace, 00021 cur_title as title, 00022 UNIX_TIMESTAMP(cur_timestamp) as value 00023 FROM cur $use_index 00024 WHERE cur_namespace=0 AND cur_is_redirect=0"; 00025 } 00026 00027 function sortDescending() { 00028 return false; 00029 } 00030 00031 function formatResult( $skin, $result ) { 00032 global $wgLang; 00033 00034 $d = $wgLang->timeanddate( wfUnix2Timestamp( $result->value ), true ); 00035 $link = $skin->makeKnownLink( $result->title, "" ); 00036 return "{$link} ({$d})"; 00037 } 00038 } 00039 00040 function wfSpecialAncientpages() 00041 { 00042 list( $limit, $offset ) = wfCheckLimits(); 00043 00044 $app = new AncientPagesPage(); 00045 00046 $app->doQuery( $offset, $limit ); 00047 } 00048 00049 ?>

Generated on Tue Jun 29 23:40:07 2004 for Mediawiki by doxygen 1.3.7