Go to the documentation of this file.
36 parent::__construct( $name );
52 return $this->
msg(
'brokenredirectstext' )->parseAsBlock();
65 'namespace' =>
'p1.page_namespace',
66 'title' =>
'p1.page_title',
76 'rd_interwiki IS NULL OR rd_interwiki = ' .
$dbr->addQuotes(
'' ),
77 'p2.page_namespace IS NULL',
83 'p2' => [
'LEFT JOIN', [
84 'rd_namespace=p2.page_namespace',
85 'rd_title=p2.page_title'
95 return [
'rd_namespace',
'rd_title',
'rd_from' ];
105 if ( isset( $result->rd_title ) ) {
106 $toObj =
Title::makeTitle( $result->rd_namespace, $result->rd_title, $result->rd_fragment );
108 $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check
for redirect, not
for links
117 $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
120 if ( !is_object( $toObj ) ) {
121 return '<del>' .
$linkRenderer->makeLink( $fromObj ) .
'</del>';
128 [
'redirect' =>
'no' ]
134 $permissionManager->userHasRight( $this->getUser(),
'edit' ) &&
140 $this->
msg(
'brokenredirects-edit' )->text(),
142 [
'action' =>
'edit' ]
145 $to =
$linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() );
148 $out = $from . $this->
msg(
'word-separator' )->escaped();
150 if ( $permissionManager->userHasRight( $this->getUser(),
'delete' ) ) {
153 $this->
msg(
'brokenredirects-delete' )->text(),
155 [
'action' =>
'delete' ]
160 $out .= $this->
msg(
'parentheses' )->rawParams( $this->
getLanguage()
161 ->pipeList( $links ) )->escaped();
163 $out .=
" {$arr} {$to}";
170 parent::execute( $par );
184 return 'maintenance';
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getPageHeader()
The content returned by this function will be output before any result.
formatResult( $skin, $result)
__construct( $name='BrokenRedirects')
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
preprocessResults( $db, $res)
Cache page content model for performance.
static getForTitle(Title $title)
Returns the appropriate ContentHandler singleton for the given title.
getLanguage()
Shortcut to get user's language.
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...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
sortDescending()
Override to sort by increasing values.
A special page listing redirects to non existent page.
execute( $par)
This is the actual workhorse.
MediaWiki Linker LinkRenderer null $linkRenderer
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
isSyndicated()
Sometime we don't want to build rss / atom feeds.