*/
static function mungeQuery( $query, $prot ) {
$field = 'el_index';
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
if ( $query === '*' && $prot !== '' ) {
// Allow queries like 'ftp://*' to find all ftp links
}
public function getQueryInfo() {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
// strip everything past first wildcard, so that
// index-based-only lookup would be done
list( $this->mungedQuery, $clause ) = self::mungeQuery( $this->mQuery, $this->mProt );
* @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 );
}
/**