36 parent::__construct( $name );
52 return $this->
msg(
'doubleredirectstext' )->parseAsBlock();
56 $limitToTitle = !( $namespace ===
null &&
$title === null );
66 'namespace' =>
'pa.page_namespace',
67 'title' =>
'pa.page_title',
69 'b_namespace' =>
'pb.page_namespace',
70 'b_title' =>
'pb.page_title',
74 'c_namespace' =>
'rb.rd_namespace',
75 'c_title' =>
'rb.rd_title',
76 'c_fragment' =>
'rb.rd_fragment',
77 'c_interwiki' =>
'rb.rd_interwiki',
80 'ra.rd_from = pa.page_id',
89 'ra.rd_interwiki IS NULL OR ra.rd_interwiki = ' .
$dbr->addQuotes(
'' ),
91 'pb.page_namespace = ra.rd_namespace',
92 'pb.page_title = ra.rd_title',
94 'rb.rd_from = pb.page_id',
98 if ( $limitToTitle ) {
99 $retval[
'conds'][
'pa.page_namespace'] = $namespace;
100 $retval[
'conds'][
'pa.page_title'] =
$title;
111 return [
'ra.rd_namespace',
'ra.rd_title' ];
127 if ( isset( $result->b_namespace ) ) {
143 $deep =
$dbr->fetchObject(
$res ) ?:
false;
148 $titleA = Title::makeTitle( $result->namespace, $result->title );
152 return '<del>' .
$linkRenderer->makeLink( $titleA,
null, [], [
'redirect' =>
'no' ] ) .
'</del>';
158 MediaWikiServices::getInstance()
160 ->userHasRight( $this->
getUser(),
'edit' ) &&
162 MediaWikiServices::getInstance()
163 ->getContentHandlerFactory()
164 ->getContentHandler( $titleA->getContentModel() )
165 ->supportsDirectEditing()
169 $this->
msg(
'parentheses', $this->
msg(
'editlink' )->text() )->text(),
171 [
'action' =>
'edit' ]
181 [
'redirect' =>
'no' ]
184 $titleB = Title::makeTitle( $deep->b_namespace, $deep->b_title );
189 [
'redirect' =>
'no' ]
192 $titleC = Title::makeTitle(
198 $linkC =
$linkRenderer->makeKnownLink( $titleC, $titleC->getFullText() );
201 $arr =
$lang->getArrow() .
$lang->getDirMark();
203 return (
"{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
208 parent::execute( $par );
218 if ( !
$res->numRows() ) {
223 foreach (
$res as $row ) {
224 $batch->
add( $row->namespace, $row->title );
225 if ( isset( $row->b_namespace ) ) {
227 $batch->add( $row->b_namespace, $row->b_title );
229 if ( isset( $row->c_interwiki ) && !$row->c_interwiki ) {
231 $batch->add( $row->c_namespace, $row->c_title );
241 return 'maintenance';
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Class representing a list of titles The execute() method checks them all for existence and adds them ...
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
A special page listing redirects to redirecting page.
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 and gender distinction for performance.
execute( $par)
This is the actual workhorse.
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.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
reallyGetQueryInfo( $namespace=null, $title=null)
getPageHeader()
The content returned by this function will be output before any result.
__construct( $name='DoubleRedirects')
formatResult( $skin, $result)
getOrderFields()
Subclasses return an array of fields to order by here.
isSyndicated()
Sometime we don't want to build rss / atom feeds.
getUser()
Shortcut to get the User executing this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
MediaWiki Linker LinkRenderer null $linkRenderer
if(!isset( $args[0])) $lang