47 parent::__construct(
'Wantedpages' );
50 $this->linksMigration = $linksMigration;
61 $this->limit = (int)$par;
64 $this->shownavigation = !$inc;
65 parent::execute( $par );
71 [ $blNamespace, $blTitle ] = $this->linksMigration->getTitleFields(
'pagelinks' );
72 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks',
'pagelinks' );
74 'tables' => array_merge( $queryInfo[
'tables'], [
79 'namespace' => $blNamespace,
84 'pg1.page_namespace' =>
null,
90 'COUNT(*) > ' . $dbr->addQuotes( $count ),
91 'COUNT(*) > SUM(pg2.page_is_redirect)'
93 'GROUP BY' => [ $blNamespace, $blTitle ]
95 'join_conds' => array_merge( [
98 'pg1.page_namespace = ' . $blNamespace,
99 'pg1.page_title = ' . $blTitle
102 'pg2' => [
'LEFT JOIN',
'pg2.page_id = pl_from' ]
103 ], $queryInfo[
'joins'] )
106 $this->
getHookRunner()->onWantedPages__getQueryInfo( $this, $query );
112 return 'maintenance';
120class_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.