56 parent::__construct(
'DoubleRedirects' );
76 return $this->
msg(
'doubleredirectstext' )->parseAsBlock();
80 $limitToTitle = !( $namespace ===
null &&
$title === null );
89 'namespace' =>
'pa.page_namespace',
90 'title' =>
'pa.page_title',
92 'b_namespace' =>
'pb.page_namespace',
93 'b_title' =>
'pb.page_title',
97 'c_namespace' =>
'rb.rd_namespace',
98 'c_title' =>
'rb.rd_title',
99 'c_fragment' =>
'rb.rd_fragment',
100 'c_interwiki' =>
'rb.rd_interwiki',
103 'ra.rd_from = pa.page_id',
112 'ra.rd_interwiki IS NULL OR ra.rd_interwiki = ' . $this->dbr->addQuotes(
'' ),
114 'pb.page_namespace = ra.rd_namespace',
115 'pb.page_title = ra.rd_title',
117 'rb.rd_from = pb.page_id',
121 if ( $limitToTitle ) {
122 $retval[
'conds'][
'pa.page_namespace'] = $namespace;
123 $retval[
'conds'][
'pa.page_title'] =
$title;
134 return [
'ra.rd_namespace',
'ra.rd_title' ];
150 if ( isset( $result->b_namespace ) ) {
157 $deep = $this->dbr->selectRow(
166 $titleA = Title::makeTitle( $result->namespace, $result->title );
178 $this->contentHandlerFactory->getContentHandler( $titleA->getContentModel() )
179 ->supportsDirectEditing()
183 $this->
msg(
'parentheses', $this->
msg(
'editlink' )->text() )->text(),
185 [
'action' =>
'edit' ]
195 [
'redirect' =>
'no' ]
198 $titleB = Title::makeTitle( $deep->b_namespace, $deep->b_title );
203 [
'redirect' =>
'no' ]
206 $titleC = Title::makeTitle(
215 $arr =
$lang->getArrow() .
$lang->getDirMark();
217 return (
"{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" );
222 parent::execute( $par );
232 if ( !
$res->numRows() ) {
236 $batch = $this->linkBatchFactory->newLinkBatch();
237 foreach (
$res as $row ) {
238 $batch->add( $row->namespace, $row->title );
239 if ( isset( $row->b_namespace ) ) {
241 $batch->add( $row->b_namespace, $row->b_title );
243 if ( isset( $row->c_interwiki ) && !$row->c_interwiki ) {
245 $batch->add( $row->c_namespace, $row->c_title );
255 return 'maintenance';
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDBLoadBalancer(ILoadBalancer $loadBalancer)
ILoadBalancer null $loadBalancer
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...
IContentHandlerFactory $contentHandlerFactory
reallyGetQueryInfo( $namespace=null, $title=null)
__construct(IContentHandlerFactory $contentHandlerFactory, LinkBatchFactory $linkBatchFactory, ILoadBalancer $loadBalancer)
LinkBatchFactory $linkBatchFactory
getPageHeader()
The content returned by this function will be output before any result.
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.
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.
if(!isset( $args[0])) $lang