43 parent::__construct(
'Wantedpages' );
46 $this->linksMigration = $linksMigration;
57 $this->limit = (int)$par;
60 $this->shownavigation = !$inc;
61 parent::execute( $par );
67 [ $blNamespace, $blTitle ] = $this->linksMigration->getTitleFields(
'pagelinks' );
68 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks',
'pagelinks' );
70 'tables' => array_merge( $queryInfo[
'tables'], [
75 'namespace' => $blNamespace,
80 'pg1.page_namespace' =>
null,
86 'COUNT(*) > ' . $dbr->addQuotes( $count ),
87 'COUNT(*) > SUM(pg2.page_is_redirect)'
89 'GROUP BY' => [ $blNamespace, $blTitle ]
91 'join_conds' => array_merge( [
94 'pg1.page_namespace = ' . $blNamespace,
95 'pg1.page_title = ' . $blTitle
98 'pg2' => [
'LEFT JOIN',
'pg2.page_id = pl_from' ]
99 ], $queryInfo[
'joins'] )
102 $this->
getHookRunner()->onWantedPages__getQueryInfo( $this, $query );
108 return 'maintenance';
116class_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.
Base class for a "wanted" query page like WantedPages, WantedTemplates, etc.
List of the most-linked pages that do 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.