* @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
- # There's no point doing a batch check if we aren't caching results;
- # the page must exist for it to have been pulled out of the table
- if ( !$this->isCached() || !$res->numRows() ) {
- return;
- }
-
- $batch = new LinkBatch();
- foreach ( $res as $row ) {
- $batch->add( $row->namespace, $row->title );
- }
- $batch->execute();
-
- $res->seek( 0 );
+ $this->executeLBFromResultWrapper( $res );
}
function sortDescending() {
Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) );
}
- $hlink = Linker::linkKnown(
+ $linkRenderer = $this->getLinkRenderer();
+ $hlink = $linkRenderer->makeKnownLink(
$title,
- $this->msg( 'hist' )->escaped(),
+ $this->msg( 'hist' )->text(),
[],
[ 'action' => 'history' ]
);
$hlinkInParentheses = $this->msg( 'parentheses' )->rawParams( $hlink )->escaped();
if ( $this->isCached() ) {
- $plink = Linker::link( $title );
+ $plink = $linkRenderer->makeLink( $title );
$exists = $title->exists();
} else {
- $plink = Linker::linkKnown( $title );
+ $plink = $linkRenderer->makeKnownLink( $title );
$exists = true;
}