summaryrefslogtreecommitdiff
path: root/includes/PageQueryPage.php
blob: a2091e8b46ded7a12df6fc16774117e075663c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

/**
 * Variant of QueryPage which formats the result as a simple link to the page
 *
 * @ingroup SpecialPage
 */
class PageQueryPage extends QueryPage {

	/**
	 * Format the result as a simple link to the page
	 *
	 * @param $skin Skin
	 * @param $row Object: result row
	 * @return string
	 */
	public function formatResult( $skin, $row ) {
		global $wgContLang;
		$title = Title::makeTitleSafe( $row->namespace, $row->title );
		$text = $row->title;
		if ($title instanceof Title)
			$text = $wgContLang->convert( $title->getPrefixedText() ); 
		return $skin->link( $title, htmlspecialchars($text), array(), array(), array('known', 'noclasses') );
	}
}