PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking...
[lhc/web/wiklou.git] / includes / SpecialSearch.php
index 9ecd39e..e96c875 100644 (file)
@@ -19,8 +19,7 @@
 
 /**
  * Run text & title search and display the output
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  */
 
 /**
@@ -44,8 +43,7 @@ function wfSpecialSearch( $par = '' ) {
 
 /**
  * @todo document
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  */
 class SpecialSearch {
 
@@ -161,12 +159,14 @@ 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,
@@ -314,7 +314,7 @@ class SpecialSearch {
                        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 );