9use MediaWiki\Cache\LinkBatchFactory;
11use MediaWiki\Languages\LanguageConverterFactory;
32 LinkBatchFactory $linkBatchFactory,
33 LanguageConverterFactory $languageConverterFactory
35 parent::__construct(
'Ancientpages' );
36 $this->namespaceInfo = $namespaceInfo;
39 $this->languageConverter = $languageConverterFactory->getLanguageConverter( $this->
getContentLanguage() );
54 $tables = [
'page',
'revision' ];
56 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
57 'page_is_redirect' => 0
62 'page_latest = rev_id'
68 $this->
getHookRunner()->onAncientPagesQuery( $tables, $conds, $joinConds );
73 'namespace' =>
'page_namespace',
74 'title' =>
'page_title',
75 'value' =>
'rev_timestamp'
78 'join_conds' => $joinConds
103 $d = $this->
getLanguage()->userTimeAndDate( $result->value, $this->getUser() );
107 $link = $linkRenderer->makeKnownLink(
109 new HtmlArmor( $this->languageConverter->convertHtml( $title->getPrefixedText() ) )
112 return $this->
getLanguage()->specialList( $link, htmlspecialchars( $d ) );
117 return 'maintenance';
122class_alias( SpecialAncientPages::class,
'SpecialAncientPages' );
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDatabaseProvider(IConnectionProvider $databaseProvider)
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
getContentLanguage()
Shortcut to get content language.
getLanguage()
Shortcut to get user's language.
Implements Special:Ancientpages.
formatResult( $skin, $result)
usesTimestamps()
Does this query return timestamps rather than integers in its 'value' field? If true,...
isSyndicated()
Sometimes we don't want to build rss / atom feeds.to override bool
sortDescending()
Override to sort by increasing values.to override bool
__construct(NamespaceInfo $namespaceInfo, IConnectionProvider $dbProvider, LinkBatchFactory $linkBatchFactory, LanguageConverterFactory $languageConverterFactory)
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
preprocessResults( $db, $res)
Do any necessary preprocessing of the result object.to override
isExpensive()
Should this query page only be updated offline on large wikis?If the query for this page is considere...
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...