check that $wgArticle is an instance of the Article class in Skin::pageStats() per...
[lhc/web/wiklou.git] / includes / PageQueryPage.php
1 <?php
2
3 /**
4 * Variant of QueryPage which formats the result as a simple link to the page
5 *
6 * @ingroup SpecialPage
7 */
8 class PageQueryPage extends QueryPage {
9
10 /**
11 * Format the result as a simple link to the page
12 *
13 * @param $skin Skin
14 * @param $row Object: result row
15 * @return string
16 */
17 public function formatResult( $skin, $row ) {
18 global $wgContLang;
19 $title = Title::makeTitleSafe( $row->namespace, $row->title );
20 $text = $row->title;
21 if ($title instanceof Title)
22 $text = $wgContLang->convert( $title->getPrefixedText() );
23 return $skin->link( $title, htmlspecialchars($text), array(), array(), array('known', 'noclasses') );
24 }
25 }