Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / specials / SpecialLinkSearch.php
index d4886f0..a2fa844 100644 (file)
@@ -153,7 +153,7 @@ class LinkSearchPage extends QueryPage {
         */
        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
@@ -185,7 +185,7 @@ class LinkSearchPage extends QueryPage {
        }
 
        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 );
@@ -225,16 +225,7 @@ class LinkSearchPage extends QueryPage {
         * @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 );
        }
 
        /**