MediaWiki REL1_31
SpecialAncientpages.php
Go to the documentation of this file.
1<?php
30
31 function __construct( $name = 'Ancientpages' ) {
32 parent::__construct( $name );
33 }
34
35 public function isExpensive() {
36 return true;
37 }
38
39 function isSyndicated() {
40 return false;
41 }
42
43 public function getQueryInfo() {
44 return [
45 'tables' => [ 'page', 'revision' ],
46 'fields' => [
47 'namespace' => 'page_namespace',
48 'title' => 'page_title',
49 'value' => 'rev_timestamp'
50 ],
51 'conds' => [
52 'page_namespace' => MWNamespace::getContentNamespaces(),
53 'page_is_redirect' => 0,
54 'page_latest=rev_id'
55 ]
56 ];
57 }
58
59 public function usesTimestamps() {
60 return true;
61 }
62
63 function sortDescending() {
64 return false;
65 }
66
67 public function preprocessResults( $db, $res ) {
69 }
70
76 function formatResult( $skin, $result ) {
77 global $wgContLang;
78
79 $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() );
80 $title = Title::makeTitle( $result->namespace, $result->title );
82 $link = $linkRenderer->makeKnownLink(
83 $title,
84 $wgContLang->convert( $title->getPrefixedText() )
85 );
86
87 return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
88 }
89
90 protected function getGroupName() {
91 return 'maintenance';
92 }
93}
Implements Special:Ancientpages.
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
preprocessResults( $db, $res)
Do any necessary preprocessing of the result object.
__construct( $name='Ancientpages')
isSyndicated()
Sometime we don't want to build rss / atom feeds.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
formatResult( $skin, $result)
usesTimestamps()
Does this query return timestamps rather than integers in its 'value' field? If true,...
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
sortDescending()
Override to sort by increasing values.
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
Definition QueryPage.php:34
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed ResultWrapper (MUST include title and ...
getLanguage()
Shortcut to get user's language.
MediaWiki Linker LinkRenderer null $linkRenderer
$res
Definition database.txt:21
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
Definition design.txt:57
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Definition hooks.txt:3021