42 private $namespaceInfo;
45 private $languageConverter;
59 parent::__construct(
'Fewestrevisions' );
60 $this->namespaceInfo = $namespaceInfo;
76 'tables' => [
'revision',
'page' ],
78 'namespace' =>
'page_namespace',
79 'title' =>
'page_title',
80 'value' =>
'COUNT(*)',
83 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
85 'page_is_redirect = 0',
88 'GROUP BY' => [
'page_namespace',
'page_title' ]
103 $nt = Title::makeTitleSafe( $result->namespace, $result->title );
105 return Html::element(
107 [
'class' =>
'mw-invalidtitle' ],
108 Linker::getInvalidTitleDescription(
117 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
118 $plink = $linkRenderer->makeLink( $nt,
new HtmlArmor( $text ) );
120 $nl = $this->
msg(
'nrevisions' )->numParams( $result->value )->text();
121 $redirect = isset( $result->redirect ) && $result->redirect ?
122 ' - ' . $this->
msg(
'isredirect' )->escaped() :
'';
123 $nlink = $linkRenderer->makeKnownLink(
127 [
'action' =>
'history' ]
130 return $this->
getLanguage()->specialList( $plink, $nlink );
144 return 'maintenance';
Marks HTML that shouldn't be escaped.
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setDBLoadBalancer(ILoadBalancer $loadBalancer)
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
Special page for listing the articles with the fewest revisions.
sortDescending()
Override to sort by increasing values.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.
__construct(NamespaceInfo $namespaceInfo, ILoadBalancer $loadBalancer, LinkBatchFactory $linkBatchFactory, LanguageConverterFactory $languageConverterFactory)
isExpensive()
Should this query page only be updated offline on large wikis?
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
preprocessResults( $db, $res)
Cache page existence for performance.
formatResult( $skin, $result)
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.
getContentLanguage()
Shortcut to get content language.
The shared interface for all language converters.