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
ContribsPager: Don't call non-static function statically
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialMostlinked.php
diff --git
a/includes/specials/SpecialMostlinked.php
b/includes/specials/SpecialMostlinked.php
index
3663647
..
fbfaa73
100644
(file)
--- a/
includes/specials/SpecialMostlinked.php
+++ b/
includes/specials/SpecialMostlinked.php
@@
-25,6
+25,9
@@
* @author Rob Church <robchur@gmail.com>
*/
* @author Rob Church <robchur@gmail.com>
*/
+use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IDatabase;
+
/**
* A special page to show pages ordered by the number of pages linking to them.
*
/**
* A special page to show pages ordered by the number of pages linking to them.
*
@@
-78,16
+81,7
@@
class MostlinkedPage extends QueryPage {
* @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
* @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
- if ( $res->numRows() > 0 ) {
- $linkBatch = new LinkBatch();
-
- foreach ( $res as $row ) {
- $linkBatch->add( $row->namespace, $row->title );
- }
-
- $res->seek( 0 );
- $linkBatch->execute();
- }
+ $this->executeLBFromResultWrapper( $res );
}
/**
}
/**
@@
-100,7
+94,8
@@
class MostlinkedPage extends QueryPage {
function makeWlhLink( $title, $caption ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() );
function makeWlhLink( $title, $caption ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() );
- return Linker::linkKnown( $wlh, $caption );
+ $linkRenderer = $this->getLinkRenderer();
+ return $linkRenderer->makeKnownLink( $wlh, $caption );
}
/**
}
/**
@@
-124,10
+119,11
@@
class MostlinkedPage extends QueryPage {
);
}
);
}
- $link = Linker::link( $title );
+ $linkRenderer = $this->getLinkRenderer();
+ $link = $linkRenderer->makeLink( $title );
$wlh = $this->makeWlhLink(
$title,
$wlh = $this->makeWlhLink(
$title,
- $this->msg( 'nlinks' )->numParams( $result->value )->
escaped
()
+ $this->msg( 'nlinks' )->numParams( $result->value )->
text
()
);
return $this->getLanguage()->specialList( $link, $wlh );
);
return $this->getLanguage()->specialList( $link, $wlh );