Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / specialpage / PageQueryPage.php
index 97f004f..45cef2b 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup SpecialPage
  */
 
+use Wikimedia\Rdbms\ResultWrapper;
+
 /**
  * Variant of QueryPage which formats the result as a simple link to the page
  *
@@ -36,17 +38,7 @@ abstract class PageQueryPage extends QueryPage {
         * @param ResultWrapper $res
         */
        public function preprocessResults( $db, $res ) {
-               if ( !$res->numRows() ) {
-                       return;
-               }
-
-               $batch = new LinkBatch();
-               foreach ( $res as $row ) {
-                       $batch->add( $row->namespace, $row->title );
-               }
-               $batch->execute();
-
-               $res->seek( 0 );
+               $this->executeLBFromResultWrapper( $res );
        }
 
        /**