From 03b00bcb843a2cdc0ae5cb7cb86bf1bc74ea99cb Mon Sep 17 00:00:00 2001 From: Alex Z Date: Sat, 4 Oct 2008 23:05:47 +0000 Subject: [PATCH] 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. --- includes/PageQueryPage.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ); } } -- 2.20.1