27 namespace MediaWiki\Specials;
54 parent::__construct(
'Unusedtemplates' );
56 $this->linksMigration = $linksMigration;
76 $queryInfo = $this->linksMigration->getQueryInfo(
81 [ $ns, $title ] = $this->linksMigration->getTitleFields(
'templatelinks' );
83 $templatelinksJoin = [
84 'LEFT JOIN', [
"$title = page_title",
85 "$ns = page_namespace" ] ];
86 if ( in_array(
'linktarget', $queryInfo[
'tables'] ) ) {
87 $joinConds[
'linktarget'] = $templatelinksJoin;
89 $joinConds[
'templatelinks'] = $templatelinksJoin;
92 'tables' => array_merge( $queryInfo[
'tables'], [
'page' ] ),
94 'namespace' =>
'page_namespace',
95 'title' =>
'page_title',
100 'page_is_redirect' => 0
102 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
118 $pageLink = $linkRenderer->makeKnownLink(
122 [
'redirect' =>
'no' ]
124 $wlhLink = $linkRenderer->makeKnownLink(
126 $this->msg(
'unusedtemplateswlh' )->text()
129 return $this->
getLanguage()->specialList( $pageLink, $wlhLink );
133 return $this->
msg(
'unusedtemplatestext' )->parseAsBlock();
137 return 'maintenance';
145 class_alias( SpecialUnusedTemplates::class,
'SpecialUnusedTemplates' );
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...
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,...
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.
The base class for all skins.