[ 'langlinks', 'page' ], 'fields' => [ 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'COUNT(*)' ], 'conds' => [ 'page_namespace' => MediaWikiServices::getInstance()->getNamespaceInfo()->getContentNamespaces() ], 'options' => [ 'HAVING' => 'COUNT(*) > 1', 'GROUP BY' => [ 'page_namespace', 'page_title' ] ], 'join_conds' => [ 'page' => [ 'LEFT JOIN', 'page_id = ll_from' ] ] ]; } /** * Pre-fill the link cache * * @param IDatabase $db * @param IResultWrapper $res */ function preprocessResults( $db, $res ) { $this->executeLBFromResultWrapper( $res ); } /** * @param Skin $skin * @param object $result * @return string */ function formatResult( $skin, $result ) { $title = Title::makeTitleSafe( $result->namespace, $result->title ); if ( !$title ) { return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) ); } $linkRenderer = $this->getLinkRenderer(); if ( $this->isCached() ) { $link = $linkRenderer->makeLink( $title ); } else { $link = $linkRenderer->makeKnownLink( $title ); } $count = $this->msg( 'ninterwikis' )->numParams( $result->value )->escaped(); return $this->getLanguage()->specialList( $link, $count ); } protected function getGroupName() { return 'highuse'; } }