48 parent::__construct(
'Unusedtemplates' );
70 $queryInfo = $this->linksMigration->getQueryInfo(
75 list( $ns,
$title ) = $this->linksMigration->getTitleFields(
'templatelinks' );
77 $templatelinksJoin = [
78 'LEFT JOIN', [
"$title = page_title",
79 "$ns = page_namespace" ] ];
80 if ( in_array(
'linktarget', $queryInfo[
'tables'] ) ) {
81 $joinConds[
'linktarget'] = $templatelinksJoin;
83 $joinConds[
'templatelinks'] = $templatelinksJoin;
86 'tables' => array_merge( $queryInfo[
'tables'], [
'page' ] ),
88 'namespace' =>
'page_namespace',
89 'title' =>
'page_title',
94 'page_is_redirect' => 0
96 'join_conds' => array_merge( $joinConds, $queryInfo[
'joins'] )
116 [
'redirect' =>
'no' ]
120 $this->msg(
'unusedtemplateswlh' )->text()
123 return $this->
getLanguage()->specialList( $pageLink, $wlhLink );
127 return $this->
msg(
'unusedtemplatestext' )->parseAsBlock();
131 return 'maintenance';
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setDBLoadBalancer(ILoadBalancer $loadBalancer)
ILoadBalancer null $loadBalancer
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,...
LinkRenderer null $linkRenderer
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.
A special page that lists unused templates.
sortDescending()
Override to sort by increasing values.
LinksMigration $linksMigration
__construct(ILoadBalancer $loadBalancer, LinksMigration $linksMigration)
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
isSyndicated()
Sometimes we don't want to build rss / atom feeds.
getPageHeader()
The content returned by this function will be output before any result.
formatResult( $skin, $result)
preprocessResults( $db, $res)
Do any necessary preprocessing of the result object.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getOrderFields()
Subclasses return an array of fields to order by here.
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.