X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FPageQueryPage.php;h=02a883ab938a3a967f151587ff0bd1e3734a7035;hb=61edb7525f9d496f8ff029d8047dcb6edef29852;hp=367f387e9edfc97491cd5d18435491f8222ce2c1;hpb=c87a63935a2595f6c24f0a3af94cd29d2b82f80a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PageQueryPage.php b/includes/PageQueryPage.php index 367f387e9e..02a883ab93 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 ) );