executeLBFromResultWrapper( $res ); } /** * Format the result as a simple link to the page * * @param Skin $skin * @param object $row Result row * @return string */ public function formatResult( $skin, $row ) { $title = Title::makeTitleSafe( $row->namespace, $row->title ); if ( $title instanceof Title ) { $text = MediaWikiServices::getInstance()->getContentLanguage()-> convert( htmlspecialchars( $title->getPrefixedText() ) ); return $this->getLinkRenderer()->makeLink( $title, new HtmlArmor( $text ) ); } else { return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ], Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) ); } } }