/**
* Run text & title search and display the output
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
/**
/**
* @todo document
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
class SpecialSearch {
$num = ( $titleMatches ? $titleMatches->numRows() : 0 )
+ ( $textMatches ? $textMatches->numRows() : 0);
- if ( $num >= $this->limit ) {
- $top = wfShowingResults( $this->offset, $this->limit );
- } else {
- $top = wfShowingResultsNum( $this->offset, $this->limit, $num );
+ if ( $num > 0 ) {
+ if ( $num >= $this->limit ) {
+ $top = wfShowingResults( $this->offset, $this->limit );
+ } else {
+ $top = wfShowingResultsNum( $this->offset, $this->limit, $num );
+ }
+ $wgOut->addHTML( "<p>{$top}</p>\n" );
}
- $wgOut->addHTML( "<p>{$top}</p>\n" );
if( $num || $this->offset ) {
$prevnext = wfViewPrevNext( $this->offset, $this->limit,
wfProfileOut( $fname );
return "<!-- Broken link in search result -->\n";
}
- $sk =& $wgUser->getSkin();
+ $sk = $wgUser->getSkin();
$contextlines = $wgUser->getOption( 'contextlines', 5 );
$contextchars = $wgUser->getOption( 'contextchars', 50 );