wiki.techinc.nl/includes/PageQueryPage.php

27 lines
639 B
PHP
Raw Normal View History

2007-03-31 23:36:58 +00:00
<?php
/**
* Variant of QueryPage which formats the result as a simple link to the page
*
* @ingroup SpecialPage
2007-03-31 23:36:58 +00:00
*/
abstract class PageQueryPage extends QueryPage {
2007-03-31 23:36:58 +00:00
/**
* Format the result as a simple link to the page
*
* @param $skin Skin
* @param $row Object: result row
2007-03-31 23:36:58 +00:00
* @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 Linker::linkKnown( $title, htmlspecialchars( $text ) );
2007-03-31 23:36:58 +00:00
}
}