55 parent::__construct(
'Lonelypages' );
56 $this->namespaceInfo = $namespaceInfo;
60 $this->linksMigration = $linksMigration;
64 return $this->
msg(
'lonelypagestext' )->parseAsBlock();
80 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks',
'pagelinks',
'LEFT JOIN' );
81 $tables = [
'page',
'linktarget',
'templatelinks',
'pagelinks' ];
84 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
85 'page_is_redirect' => 0,
89 'templatelinks' => [
'LEFT JOIN', [
'tl_target_id=lt_id' ] ],
92 "lt_namespace = page_namespace",
93 "lt_title = page_title"
98 if ( !in_array(
'linktarget', $queryInfo[
'tables'] ) ) {
99 $joinConds[
'pagelinks'] = [
101 "pl_namespace = page_namespace",
102 "pl_title = page_title"
108 $this->
getHookRunner()->onLonelyPagesQuery( $tables, $conds, $joinConds );
113 'namespace' =>
'page_namespace',
114 'title' =>
'page_title',
117 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
124 if ( count( $this->namespaceInfo->getContentNamespaces() ) > 1 ) {
125 return [
'page_namespace',
'page_title' ];
127 return [
'page_title' ];
132 return 'maintenance';
137class_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.
List of 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)