X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fspecialpage%2FPageQueryPage.php;h=3bb3f8515f1a9ffdf6e1d88f802626567c67239b;hb=dcdb8e463e3b2be121c61c91df13ea36d270a602;hp=d72744b13c4d73f3bf059874963fb117448cd9b0;hpb=2721bc43dfc1ea6a3af678c63bdd3a06b2795cc2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/PageQueryPage.php b/includes/specialpage/PageQueryPage.php index d72744b13c..3bb3f8515f 100644 --- a/includes/specialpage/PageQueryPage.php +++ b/includes/specialpage/PageQueryPage.php @@ -36,17 +36,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 ); } /** @@ -65,7 +55,7 @@ abstract class PageQueryPage extends QueryPage { $text = $wgContLang->convert( $title->getPrefixedText() ); return Linker::link( $title, htmlspecialchars( $text ) ); } else { - return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), + return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) ); } }