50 parent::__construct(
'Wantedpages' );
53 $this->linksMigration = $linksMigration;
64 $this->limit = (int)$par;
67 $this->shownavigation = !$inc;
68 parent::execute( $par );
74 [ $blNamespace, $blTitle ] = $this->linksMigration->getTitleFields(
'pagelinks' );
75 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks',
'pagelinks' );
77 'tables' => array_merge( $queryInfo[
'tables'], [
82 'namespace' => $blNamespace,
87 'pg1.page_namespace' =>
null,
93 'COUNT(*) > ' . $dbr->addQuotes( $count ),
94 'COUNT(*) > SUM(pg2.page_is_redirect)'
96 'GROUP BY' => [ $blNamespace, $blTitle ]
98 'join_conds' => array_merge( [
101 'pg1.page_namespace = ' . $blNamespace,
102 'pg1.page_title = ' . $blTitle
105 'pg2' => [
'LEFT JOIN',
'pg2.page_id = pl_from' ]
106 ], $queryInfo[
'joins'] )
109 $this->
getHookRunner()->onWantedPages__getQueryInfo( $this, $query );
115 return 'maintenance';
123class_alias( SpecialWantedPages::class,
'WantedPagesPage' );
A class containing constants representing the names of configuration variables.
const WantedPagesThreshold
Name constant for the WantedPagesThreshold setting, for use with Config::get()
setDatabaseProvider(IConnectionProvider $databaseProvider)
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
getConfig()
Shortcut to get main config object.
including( $x=null)
Whether the special page is being evaluated via transclusion.
Class definition for a wanted query page like WantedPages, WantedTemplates, etc.
A special page that lists most linked pages that does not exist.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
isIncludable()
Whether it's allowed to transclude the special page via {{Special:Foo/params}}.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
__construct(IConnectionProvider $dbProvider, LinkBatchFactory $linkBatchFactory, LinksMigration $linksMigration)
execute( $par)
This is the actual workhorse.