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 'p2.page_namespace' =>
null,
102 'rd_from=p1.page_id',
104 'p2' => [
'LEFT JOIN', [
105 'rd_namespace=p2.page_namespace',
106 'rd_title=p2.page_title'
116 return [
'rd_namespace',
'rd_title',
'rd_from' ];
125 $fromObj = Title::makeTitle( $result->namespace, $result->title );
126 if ( isset( $result->rd_title ) ) {
127 $toObj = Title::makeTitle(
128 $result->rd_namespace,
139 if ( !is_object( $toObj ) ) {
140 return '<del>' . $linkRenderer->makeLink( $fromObj ) .
'</del>';
143 $from = $linkRenderer->makeKnownLink(
147 [
'redirect' =>
'no' ]
155 $this->contentHandlerFactory->getContentHandler( $fromObj->getContentModel() )
156 ->supportsDirectEditing()
158 $links[] = $linkRenderer->makeKnownLink(
160 $this->
msg(
'brokenredirects-edit' )->text(),
162 [
'action' =>
'edit' ]
165 $to = $linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() );
168 $out = $from . $this->
msg(
'word-separator' )->escaped();
171 $links[] = $linkRenderer->makeKnownLink(
173 $this->
msg(
'brokenredirects-delete' )->text(),
176 'action' =>
'delete',
177 'wpReason' => $this->
msg(
'brokenredirects-delete-reason' )
178 ->inContentLanguage()
185 $out .= $this->
msg(
'parentheses' )->rawParams( $this->
getLanguage()
186 ->pipeList( $links ) )->escaped();
188 $out .=
" {$arr} {$to}";
195 parent::execute( $par );
209 return 'maintenance';
216class_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.