MediaWiki
REL1_22
|
00001 <?php 00029 class AncientPagesPage extends QueryPage { 00030 00031 function __construct( $name = 'Ancientpages' ) { 00032 parent::__construct( $name ); 00033 } 00034 00035 function isExpensive() { 00036 return true; 00037 } 00038 00039 function isSyndicated() { 00040 return false; 00041 } 00042 00043 function getQueryInfo() { 00044 return array( 00045 'tables' => array( 'page', 'revision' ), 00046 'fields' => array( 00047 'namespace' => 'page_namespace', 00048 'title' => 'page_title', 00049 'value' => 'rev_timestamp' 00050 ), 00051 'conds' => array( 00052 'page_namespace' => MWNamespace::getContentNamespaces(), 00053 'page_is_redirect' => 0, 00054 'page_latest=rev_id' 00055 ) 00056 ); 00057 } 00058 00059 function usesTimestamps() { 00060 return true; 00061 } 00062 00063 function sortDescending() { 00064 return false; 00065 } 00066 00072 function formatResult( $skin, $result ) { 00073 global $wgContLang; 00074 00075 $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() ); 00076 $title = Title::makeTitle( $result->namespace, $result->title ); 00077 $link = Linker::linkKnown( 00078 $title, 00079 htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) 00080 ); 00081 00082 return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) ); 00083 } 00084 00085 protected function getGroupName() { 00086 return 'maintenance'; 00087 } 00088 }