dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "SpecialRecentchanges: Add class="mw-recentchanges-toplinks" to the "top links""
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialBrokenRedirects.php
diff --git
a/includes/specials/SpecialBrokenRedirects.php
b/includes/specials/SpecialBrokenRedirects.php
index
b9b2051
..
cd9345d
100644
(file)
--- a/
includes/specials/SpecialBrokenRedirects.php
+++ b/
includes/specials/SpecialBrokenRedirects.php
@@
-21,6
+21,9
@@
* @ingroup SpecialPage
*/
* @ingroup SpecialPage
*/
+use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IDatabase;
+
/**
* A special page listing redirects to non existent page. Those should be
* fixed to point to an existing page.
/**
* A special page listing redirects to non existent page. Those should be
* fixed to point to an existing page.
@@
-109,12
+112,13
@@
class BrokenRedirectsPage extends QueryPage {
}
}
}
}
+ $linkRenderer = $this->getLinkRenderer();
// $toObj may very easily be false if the $result list is cached
if ( !is_object( $toObj ) ) {
// $toObj may very easily be false if the $result list is cached
if ( !is_object( $toObj ) ) {
- return '<del>' .
Linker::l
ink( $fromObj ) . '</del>';
+ return '<del>' .
$linkRenderer->makeL
ink( $fromObj ) . '</del>';
}
}
- $from =
Linker::linkKnown
(
+ $from =
$linkRenderer->makeKnownLink
(
$fromObj,
null,
[],
$fromObj,
null,
[],
@@
-128,28
+132,22
@@
class BrokenRedirectsPage extends QueryPage {
// check, if the content model is editable through action=edit
ContentHandler::getForTitle( $fromObj )->supportsDirectEditing()
) {
// check, if the content model is editable through action=edit
ContentHandler::getForTitle( $fromObj )->supportsDirectEditing()
) {
- $links[] =
Linker::linkKnown
(
+ $links[] =
$linkRenderer->makeKnownLink
(
$fromObj,
$fromObj,
- $this->msg( 'brokenredirects-edit' )->
escaped
(),
+ $this->msg( 'brokenredirects-edit' )->
text
(),
[],
[ 'action' => 'edit' ]
);
}
[],
[ 'action' => 'edit' ]
);
}
- $to = Linker::link(
- $toObj,
- null,
- [],
- [],
- [ 'broken' ]
- );
+ $to = $linkRenderer->makeBrokenLink( $toObj );
$arr = $this->getLanguage()->getArrow();
$out = $from . $this->msg( 'word-separator' )->escaped();
if ( $this->getUser()->isAllowed( 'delete' ) ) {
$arr = $this->getLanguage()->getArrow();
$out = $from . $this->msg( 'word-separator' )->escaped();
if ( $this->getUser()->isAllowed( 'delete' ) ) {
- $links[] =
Linker::linkKnown
(
+ $links[] =
$linkRenderer->makeKnownLink
(
$fromObj,
$fromObj,
- $this->msg( 'brokenredirects-delete' )->
escaped
(),
+ $this->msg( 'brokenredirects-delete' )->
text
(),
[],
[ 'action' => 'delete' ]
);
[],
[ 'action' => 'delete' ]
);
@@
-171,18
+169,7
@@
class BrokenRedirectsPage extends QueryPage {
* @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
* @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
- if ( !$res->numRows() ) {
- return;
- }
-
- $batch = new LinkBatch;
- foreach ( $res as $row ) {
- $batch->add( $row->namespace, $row->title );
- }
- $batch->execute();
-
- // Back to start for display
- $res->seek( 0 );
+ $this->executeLBFromResultWrapper( $res );
}
protected function getGroupName() {
}
protected function getGroupName() {