58 parent::__construct(
'Lonelypages' );
59 $this->namespaceInfo = $namespaceInfo;
63 $this->linksMigration = $linksMigration;
67 return $this->
msg(
'lonelypagestext' )->parseAsBlock();
83 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks',
'pagelinks',
'LEFT JOIN' );
84 $tables = [
'page',
'linktarget',
'templatelinks',
'pagelinks' ];
87 'page_namespace' => $this->namespaceInfo->getContentNamespaces(),
88 'page_is_redirect' => 0,
92 'templatelinks' => [
'LEFT JOIN', [
'tl_target_id=lt_id' ] ],
95 "lt_namespace = page_namespace",
96 "lt_title = page_title"
101 if ( !in_array(
'linktarget', $queryInfo[
'tables'] ) ) {
102 $joinConds[
'pagelinks'] = [
104 "pl_namespace = page_namespace",
105 "pl_title = page_title"
111 $this->
getHookRunner()->onLonelyPagesQuery( $tables, $conds, $joinConds );
116 'namespace' =>
'page_namespace',
117 'title' =>
'page_title',
120 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
127 if ( count( $this->namespaceInfo->getContentNamespaces() ) > 1 ) {
128 return [
'page_namespace',
'page_title' ];
130 return [
'page_title' ];
135 return 'maintenance';
140class_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)