51 parent::__construct(
'BrokenRedirects' );
70 return $this->
msg(
'brokenredirectstext' )->parseAsBlock();
83 'namespace' =>
'p1.page_namespace',
84 'title' =>
'p1.page_title',
94 'rd_interwiki IS NULL OR rd_interwiki = ' .
$dbr->addQuotes(
'' ),
95 'p2.page_namespace IS NULL',
101 'p2' => [
'LEFT JOIN', [
102 'rd_namespace=p2.page_namespace',
103 'rd_title=p2.page_title'
113 return [
'rd_namespace',
'rd_title',
'rd_from' ];
122 $fromObj = Title::makeTitle( $result->namespace, $result->title );
123 if ( isset( $result->rd_title ) ) {
124 $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title, $result->rd_fragment );
126 $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check
for redirect, not
for links
137 if ( !is_object( $toObj ) ) {
145 [
'redirect' =>
'no' ]
153 $this->contentHandlerFactory->getContentHandler( $fromObj->getContentModel() )
154 ->supportsDirectEditing()
158 $this->
msg(
'brokenredirects-edit' )->text(),
160 [
'action' =>
'edit' ]
166 $out = $from . $this->
msg(
'word-separator' )->escaped();
171 $this->
msg(
'brokenredirects-delete' )->text(),
174 'action' =>
'delete',
175 'wpReason' => $this->
msg(
'brokenredirects-delete-reason' )
176 ->inContentLanguage()
183 $out .= $this->
msg(
'parentheses' )->rawParams( $this->
getLanguage()
184 ->pipeList( $links ) )->escaped();
186 $out .=
" {$arr} {$to}";
193 parent::execute( $par );
207 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)
LinkBatchFactory null $linkBatchFactory
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
ILoadBalancer null $loadBalancer
A special page listing redirects to non existent page.
preprocessResults( $db, $res)
Cache page content model for performance.
isSyndicated()
Sometime we don't want to build rss / atom feeds.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
execute( $par)
This is the actual workhorse.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
sortDescending()
Override to sort by increasing values.
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
IContentHandlerFactory $contentHandlerFactory
formatResult( $skin, $result)
__construct(IContentHandlerFactory $contentHandlerFactory, ILoadBalancer $loadBalancer, LinkBatchFactory $linkBatchFactory)
getPageHeader()
The content returned by this function will be output before any result.
LinkRenderer null $linkRenderer
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getAuthority()
Shortcut to get the Authority executing this instance.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.