59 parent::__construct(
'Mostlinked' );
62 $this->linksMigration = $linksMigration;
74 [ $ns, $title ] = $this->linksMigration->getTitleFields(
'pagelinks' );
75 $queryInfo = $this->linksMigration->getQueryInfo(
'pagelinks' );
77 'tables' => $queryInfo[
'tables'],
84 'HAVING' =>
'COUNT(*) > 1',
85 'GROUP BY' => [ $ns, $title ],
87 'join_conds' => $queryInfo[
'joins'],
108 private function makeWlhLink( $title, $caption ) {
112 return $linkRenderer->makeKnownLink( $wlh, $caption );
124 $title = Title::makeTitleSafe( $result->namespace, $result->title );
128 [
'class' =>
'mw-invalidtitle' ],
129 Linker::getInvalidTitleDescription(
137 $link = $linkRenderer->makeLink( $title );
138 $wlh = $this->makeWlhLink(
140 $this->
msg(
'nlinks' )->numParams( $result->value )->text()
143 return $this->
getLanguage()->specialList( $link, $wlh );
155class_alias( SpecialMostLinked::class,
'SpecialMostLinked' );
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.
The base class for all skins.