39 private $namespaceInfo;
42 private $languageConverter;
56 parent::__construct(
'Fewestrevisions' );
57 $this->namespaceInfo = $namespaceInfo;
73 'tables' => [
'revision',
'page' ],
75 'namespace' =>
'page_namespace',
76 'title' =>
'page_title',
77 'value' =>
'COUNT(*)',
80 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
82 'page_is_redirect = 0',
85 'GROUP BY' => [
'page_namespace',
'page_title' ]
100 $nt = Title::makeTitleSafe( $result->namespace, $result->title );
102 return Html::element(
104 [
'class' =>
'mw-invalidtitle' ],
114 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
115 $plink = $linkRenderer->makeLink( $nt,
new HtmlArmor( $text ) );
117 $nl = $this->
msg(
'nrevisions' )->numParams( $result->value )->text();
118 $redirect = isset( $result->redirect ) && $result->redirect ?
119 ' - ' . $this->
msg(
'isredirect' )->escaped() :
'';
120 $nlink = $linkRenderer->makeKnownLink(
124 [
'action' =>
'history' ]
127 return $this->
getLanguage()->specialList( $plink, $nlink );
141 return 'maintenance';
Marks HTML that shouldn't be escaped.
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
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.