'ProxyTools' => 'includes/ProxyTools.php',
'ProtectionForm' => 'includes/ProtectionForm.php',
'QueryPage' => 'includes/QueryPage.php',
- 'PageQueryPage' => 'includes/QueryPage.php',
+ 'PageQueryPage' => 'includes/PageQueryPage.php',
'ImageQueryPage' => 'includes/ImageQueryPage.php',
'RawPage' => 'includes/RawPage.php',
'RecentChange' => 'includes/RecentChange.php',
--- /dev/null
+<?php
+
+/**
+ * Variant of QueryPage which formats the result as a simple link to the page
+ *
+ * @package MediaWiki
+ */
+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() ) ) );
+ }
+}
+
+?>
\ No newline at end of file
}
}
-/**
- * This is a subclass for very simple queries that are just looking for page
- * titles that match some criteria. It formats each result item as a link to
- * that page.
- *
- */
-class PageQueryPage extends QueryPage {
-
- function formatResult( $skin, $result ) {
- global $wgContLang;
- $nt = Title::makeTitle( $result->namespace, $result->title );
- return $skin->makeKnownLinkObj( $nt, htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) ) );
- }
-}
-
-?>
+?>
\ No newline at end of file