54 parent::__construct(
'BrokenRedirects' );
55 $this->contentHandlerFactory = $contentHandlerFactory;
73 return $this->
msg(
'brokenredirectstext' )->parseAsBlock();
86 'namespace' =>
'p1.page_namespace',
87 'title' =>
'p1.page_title',
95 $dbr->expr(
'rd_namespace',
'>=', 0 ),
97 'p2.page_namespace' =>
null,
101 'rd_from=p1.page_id',
103 'p2' => [
'LEFT JOIN', [
104 'rd_namespace=p2.page_namespace',
105 'rd_title=p2.page_title'
115 return [
'rd_namespace',
'rd_title',
'rd_from' ];
124 $fromObj = Title::makeTitle( $result->namespace, $result->title );
125 if ( isset( $result->rd_title ) ) {
126 $toObj = Title::makeTitle(
127 $result->rd_namespace,
138 if ( !is_object( $toObj ) ) {
139 return '<del>' . $linkRenderer->makeLink( $fromObj ) .
'</del>';
142 $from = $linkRenderer->makeKnownLink(
146 [
'redirect' =>
'no' ]
154 $this->contentHandlerFactory->getContentHandler( $fromObj->getContentModel() )
155 ->supportsDirectEditing()
157 $links[] = $linkRenderer->makeKnownLink(
159 $this->
msg(
'brokenredirects-edit' )->text(),
161 [
'action' =>
'edit' ]
164 $to = $linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() );
167 $out = $from . $this->
msg(
'word-separator' )->escaped();
170 $links[] = $linkRenderer->makeKnownLink(
172 $this->
msg(
'brokenredirects-delete' )->text(),
175 'action' =>
'delete',
176 'wpReason' => $this->
msg(
'brokenredirects-delete-reason' )
177 ->inContentLanguage()
184 $out .= $this->
msg(
'parentheses' )->rawParams( $this->
getLanguage()
185 ->pipeList( $links ) )->escaped();
187 $out .=
" {$arr} {$to}";
194 parent::execute( $par );
208 return 'maintenance';
213class_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.