PageQueryPage.php 662 B

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