39 parent::__construct(
'Mostlinked' );
56 [ $ns, $title ] = $this->linksMigration->getTitleFields(
'pagelinks' );
57 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks' );
59 'tables' => $queryInfo[
'tables'],
66 'HAVING' =>
'COUNT(*) > 1',
67 'GROUP BY' => [ $ns, $title ],
69 'join_conds' => $queryInfo[
'joins'],
76 PageLinksTable::VIRTUAL_DOMAIN,
98 private function makeWlhLink( $title, $caption ) {
102 return $linkRenderer->makeKnownLink( $wlh, $caption );
114 $title = Title::makeTitleSafe( $result->namespace, $result->title );
118 [
'class' =>
'mw-invalidtitle' ],
119 Linker::getInvalidTitleDescription(
127 $link = $linkRenderer->makeLink( $title );
128 $wlh = $this->makeWlhLink(
130 $this->
msg(
'nlinks' )->numParams( $result->value )->text()
133 return $this->
getLanguage()->specialList( $link, $wlh );
146class_alias( SpecialMostLinked::class,
'SpecialMostLinked' );
Factory for LinkBatch objects to batch query page metadata.
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDatabaseProvider(IConnectionProvider $databaseProvider)
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
Parent class for all special pages.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.