summaryrefslogtreecommitdiff
path: root/includes/PageQueryPage.php
blob: 5b82ebf6b20b1bdb6f9213430132a67ef4662909 (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
26
<?php

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

	/**
	 * 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 ) {
		global $wgContLang;
		$title = Title::makeTitleSafe( $row->namespace, $row->title );
		return $skin->makeKnownLinkObj( $title,
			htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
	}
}

?>