52 parent::__construct(
'Unusedtemplates' );
54 $this->linksMigration = $linksMigration;
74 $queryInfo = $this->linksMigration->getQueryInfo(
79 [ $ns, $title ] = $this->linksMigration->getTitleFields(
'templatelinks' );
81 $templatelinksJoin = [
82 'LEFT JOIN', [
"$title = page_title",
83 "$ns = page_namespace" ] ];
84 if ( in_array(
'linktarget', $queryInfo[
'tables'] ) ) {
85 $joinConds[
'linktarget'] = $templatelinksJoin;
87 $joinConds[
'templatelinks'] = $templatelinksJoin;
89 $joinConds[
'page_props'] = [
'LEFT JOIN', [
'page_id = pp_page',
'pp_propname' =>
'expectunusedtemplate' ] ];
91 'tables' => array_merge( $queryInfo[
'tables'], [
'page' ], [
'page_props' ] ),
93 'namespace' =>
'page_namespace',
94 'title' =>
'page_title',
99 'page_is_redirect' => 0,
102 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
117 $title = Title::makeTitle(
NS_TEMPLATE, $result->title );
118 $pageLink = $linkRenderer->makeKnownLink( $title );
119 $wlhLink = $linkRenderer->makeKnownLink(
121 $this->msg(
'unusedtemplateswlh' )->text()
124 return $this->
getLanguage()->specialList( $pageLink, $wlhLink );
128 return $this->
msg(
'unusedtemplatestext' )->parseAsBlock();
132 return 'maintenance';
140class_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.