MediaWiki  REL1_19
SpecialAncientpages.php
Go to the documentation of this file.
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() { return false; }
00040 
00041         function getQueryInfo() {
00042                 return array(
00043                         'tables' => array( 'page', 'revision' ),
00044                         'fields' => array( 'page_namespace AS namespace',
00045                                         'page_title AS title',
00046                                         'rev_timestamp AS value' ),
00047                         'conds' => array( 'page_namespace' => MWNamespace::getContentNamespaces(),
00048                                         'page_is_redirect' => 0,
00049                                         'page_latest=rev_id' )
00050                 );
00051         }
00052 
00053         function usesTimestamps() {
00054                 return true;
00055         }
00056 
00057         function sortDescending() {
00058                 return false;
00059         }
00060 
00061         function formatResult( $skin, $result ) {
00062                 global $wgContLang;
00063 
00064                 $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() );
00065                 $title = Title::makeTitle( $result->namespace, $result->title );
00066                 $link = Linker::linkKnown(
00067                         $title,
00068                         htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
00069                 );
00070                 return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
00071         }
00072 }