58 parent::__construct(
'Lonelypages' );
59 $this->namespaceInfo = $namespaceInfo;
63 $this->linksMigration = $linksMigration;
67 return $this->
msg(
'lonelypagestext' )->parseAsBlock();
83 $queryInfo = $this->linksMigration->getQueryInfo(
88 [ $ns, $title ] = $this->linksMigration->getTitleFields(
'templatelinks' );
89 $tables = array_merge( [
'page',
'pagelinks' ], $queryInfo[
'tables'] );
91 'pl_namespace' =>
null,
92 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
93 'page_is_redirect' => 0,
99 'pl_namespace = page_namespace',
100 'pl_title = page_title'
104 $templatelinksJoin = [
106 "$ns = page_namespace",
107 "$title = page_title"
110 if ( in_array(
'linktarget', $tables ) ) {
111 $joinConds[
'linktarget'] = $templatelinksJoin;
113 $joinConds[
'templatelinks'] = $templatelinksJoin;
117 $this->
getHookRunner()->onLonelyPagesQuery( $tables, $conds, $joinConds );
122 'namespace' =>
'page_namespace',
123 'title' =>
'page_title',
126 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
133 if ( count( $this->namespaceInfo->getContentNamespaces() ) > 1 ) {
134 return [
'page_namespace',
'page_title' ];
136 return [
'page_title' ];
141 return 'maintenance';
148class_alias( SpecialLonelyPages::class,
'SpecialLonelyPages' );
Variant of QueryPage which formats the result as a simple link to the page.
setLanguageConverter(ILanguageConverter $languageConverter)
setDatabaseProvider(IConnectionProvider $databaseProvider)
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
A special page looking for articles with no article linking to them, thus being lonely.
isExpensive()
Should this query page only be updated offline on large wikis?
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
getPageHeader()
The content returned by this function will be output before any result.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
sortDescending()
Override to sort by increasing values.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.
getOrderFields()
Subclasses return an array of fields to order by here.
__construct(NamespaceInfo $namespaceInfo, IConnectionProvider $dbProvider, LinkBatchFactory $linkBatchFactory, LanguageConverterFactory $languageConverterFactory, LinksMigration $linksMigration)