/**
* Cache page existence for performance
- * @param DatabaseBase $db
+ * @param IDatabase $db
* @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 );
}
/**
$pageLink = Linker::link(
$title,
null,
- array(),
- array(),
- array( 'broken' )
+ [],
+ [],
+ [ 'broken' ]
);
}
return $this->getLanguage()->specialList( $pageLink, $this->makeWlhLink( $title, $result ) );
* @note This will only be run if the page is cached (ie $wgMiserMode = true)
* unless forceExistenceCheck() is true.
* @since 1.24
- * @return boolean
+ * @return bool
*/
protected function existenceCheck( Title $title ) {
return $title->isKnown();