31 parent::__construct(
'Lonelypages' );
39 return $this->
msg(
'lonelypagestext' )->parseAsBlock();
59 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks',
'pagelinks',
'LEFT JOIN' );
60 $tables = [
'page',
'linktarget',
'templatelinks',
'pagelinks' ];
63 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
64 'page_is_redirect' => 0,
68 'templatelinks' => [
'LEFT JOIN', [
'tl_target_id=lt_id' ] ],
71 "lt_namespace = page_namespace",
72 "lt_title = page_title"
77 if ( !in_array(
'linktarget', $queryInfo[
'tables'] ) ) {
78 $joinConds[
'pagelinks'] = [
80 "pl_namespace = page_namespace",
81 "pl_title = page_title"
87 $this->
getHookRunner()->onLonelyPagesQuery( $tables, $conds, $joinConds );
92 'namespace' =>
'page_namespace',
93 'title' =>
'page_title',
96 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
104 if ( count( $this->namespaceInfo->getContentNamespaces() ) > 1 ) {
105 return [
'page_namespace',
'page_title' ];
107 return [
'page_title' ];
113 return 'maintenance';
118class_alias( SpecialLonelyPages::class,
'SpecialLonelyPages' );
Factory for LinkBatch objects to batch query page metadata.
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.
List of articles with no article linking to them, thus being lonely.
isExpensive()
Should this query page only be updated offline on large wikis?If the query for this page is considere...
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.to override string
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
__construct(private readonly NamespaceInfo $namespaceInfo, IConnectionProvider $dbProvider, LinkBatchFactory $linkBatchFactory, LanguageConverterFactory $languageConverterFactory, private readonly LinksMigration $linksMigration,)
sortDescending()
Override to sort by increasing values.to override bool
isSyndicated()
Sometimes we don't want to build rss / atom feeds.to override bool
getOrderFields()
Subclasses return an array of fields to order by here.Don't append DESC to the field names,...