55 parent::__construct(
'BrokenRedirects' );
56 $this->contentHandlerFactory = $contentHandlerFactory;
74 return $this->
msg(
'brokenredirectstext' )->parseAsBlock();
87 'namespace' =>
'p1.page_namespace',
88 'title' =>
'p1.page_title',
98 'rd_interwiki' => [
null,
'' ],
99 'p2.page_namespace' =>
null,
103 'rd_from=p1.page_id',
105 'p2' => [
'LEFT JOIN', [
106 'rd_namespace=p2.page_namespace',
107 'rd_title=p2.page_title'
117 return [
'rd_namespace',
'rd_title',
'rd_from' ];
126 $fromObj = Title::makeTitle( $result->namespace, $result->title );
127 if ( isset( $result->rd_title ) ) {
128 $toObj = Title::makeTitle(
129 $result->rd_namespace,
131 $result->rd_fragment ??
''
134 $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check
for redirect, not
for links
145 if ( !is_object( $toObj ) ) {
146 return '<del>' . $linkRenderer->makeLink( $fromObj ) .
'</del>';
149 $from = $linkRenderer->makeKnownLink(
153 [
'redirect' =>
'no' ]
161 $this->contentHandlerFactory->getContentHandler( $fromObj->getContentModel() )
162 ->supportsDirectEditing()
164 $links[] = $linkRenderer->makeKnownLink(
166 $this->
msg(
'brokenredirects-edit' )->text(),
168 [
'action' =>
'edit' ]
171 $to = $linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() );
174 $out = $from . $this->
msg(
'word-separator' )->escaped();
177 $links[] = $linkRenderer->makeKnownLink(
179 $this->
msg(
'brokenredirects-delete' )->text(),
182 'action' =>
'delete',
183 'wpReason' => $this->
msg(
'brokenredirects-delete-reason' )
184 ->inContentLanguage()
191 $out .= $this->
msg(
'parentheses' )->rawParams( $this->
getLanguage()
192 ->pipeList( $links ) )->escaped();
194 $out .=
" {$arr} {$to}";
201 parent::execute( $par );
215 return 'maintenance';
222class_alias( SpecialBrokenRedirects::class,
'SpecialBrokenRedirects' );
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDatabaseProvider(IConnectionProvider $databaseProvider)
executeLBFromResultWrapper(IResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed result wrapper (MUST include title and...
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
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.
The base class for all skins.