From: Alex Z Date: Sat, 4 Oct 2008 23:05:47 +0000 (+0000) Subject: Use Linker::link() in PageQueryPage instead of deprecated makeKnownLinkObj. This... X-Git-Tag: 1.31.0-rc.0~44919 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=03b00bcb843a2cdc0ae5cb7cb86bf1bc74ea99cb;p=lhc%2Fweb%2Fwiklou.git Use Linker::link() in PageQueryPage instead of deprecated makeKnownLinkObj. This also avoids PHP fatal errors if for whatever reason there's an invalid title in the results. --- diff --git a/includes/PageQueryPage.php b/includes/PageQueryPage.php index 0d1789eec8..d9e06e015b 100644 --- a/includes/PageQueryPage.php +++ b/includes/PageQueryPage.php @@ -17,7 +17,9 @@ class PageQueryPage extends QueryPage { public function formatResult( $skin, $row ) { global $wgContLang; $title = Title::makeTitleSafe( $row->namespace, $row->title ); - return $skin->makeKnownLinkObj( $title, - htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); + $text = null; + if ($title instanceof Title) + $text = htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ); + return $skin->link( $title, $text ); } }