X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPageQueryPage.php;h=01a2439f549cd66abd6cbed0697a904050e9d73c;hb=9f3dd6ceb2193056eea1b334bfca67d546594df1;hp=367f387e9edfc97491cd5d18435491f8222ce2c1;hpb=3807ba51b9387841fb9f820f2472e8adc2cfaa02;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PageQueryPage.php b/includes/PageQueryPage.php index 367f387e9e..afc02271c5 100644 --- a/includes/PageQueryPage.php +++ b/includes/PageQueryPage.php @@ -1,4 +1,25 @@ numRows() ) { + return; + } + + $batch = new LinkBatch(); + foreach ( $res as $row ) { + $batch->add( $row->namespace, $row->title ); + } + $batch->execute(); + + $res->seek( 0 ); + } /** * Format the result as a simple link to the page * - * @param $skin Skin - * @param $row Object: result row + * @param Skin $skin + * @param object $row Result row * @return string */ public function formatResult( $skin, $row ) { @@ -21,7 +63,7 @@ abstract class PageQueryPage extends QueryPage { if ( $title instanceof Title ) { $text = $wgContLang->convert( $title->getPrefixedText() ); - return Linker::linkKnown( $title, htmlspecialchars( $text ) ); + return Linker::link( $title, htmlspecialchars( $text ) ); } else { return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) );