From ef666357bd918cc05ce1af95442cf662f30a68d5 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 2 May 2010 20:34:40 +0000 Subject: [PATCH] Fixed some doxygen warnings and documented warnings --- includes/specials/SpecialSearch.php | 69 +++++++++++++++++++---------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 2ec838ce2a..4b565e8196 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -56,11 +56,10 @@ class SpecialSearch { * Set up basic search parameters from the request and user settings. * Typically you'll pass $wgRequest and $wgUser. * - * @param WebRequest $request - * @param User $user - * @public + * @param $request WebRequest + * @param $user User */ - function __construct( &$request, &$user ) { + public function __construct( &$request, &$user ) { list( $this->limit, $this->offset ) = $request->getLimitOffset( 20, 'searchlimit' ); $this->mPrefix = $request->getVal('prefix', ''); # Extract requested namespaces @@ -78,7 +77,8 @@ class SpecialSearch { /** * If an exact title match can be found, jump straight ahead to it. - * @param string $term + * + * @param $term String */ public function goResult( $term ) { global $wgOut; @@ -111,7 +111,7 @@ class SpecialSearch { } /** - * @param string $term + * @param $term String */ public function showResults( $term ) { global $wgOut, $wgUser, $wgDisableTextSearch, $wgContLang, $wgScript; @@ -371,8 +371,8 @@ class SpecialSearch { * Extract "power search" namespace settings from the request object, * returning a list of index numbers to search. * - * @param WebRequest $request - * @return array + * @param $request WebRequest + * @return Array */ protected function powerSearch( &$request ) { $arr = array(); @@ -386,7 +386,8 @@ class SpecialSearch { /** * Reconstruct the 'power search' options for links - * @return array + * + * @return Array */ protected function powerSearchOptions() { $opt = array(); @@ -403,7 +404,7 @@ class SpecialSearch { /** * Show whole set of results * - * @param SearchResultSet $matches + * @param $matches SearchResultSet */ protected function showMatches( &$matches ) { global $wgContLang; @@ -431,8 +432,9 @@ class SpecialSearch { /** * Format a single hit result - * @param SearchResult $result - * @param array $terms terms to highlight + * + * @param $result SearchResult + * @param $terms Array: terms to highlight */ protected function showHit( $result, $terms ) { global $wgContLang, $wgLang, $wgUser; @@ -612,7 +614,8 @@ class SpecialSearch { /** * Show results from other wikis * - * @param SearchResultSet $matches + * @param $matches SearchResultSet + * @param $query String */ protected function showInterwiki( &$matches, $query ) { global $wgContLang; @@ -650,11 +653,11 @@ class SpecialSearch { /** * Show single interwiki link * - * @param SearchResult $result - * @param string $lastInterwiki - * @param array $terms - * @param string $query - * @param array $customCaptions iw prefix -> caption + * @param $result SearchResult + * @param $lastInterwiki String + * @param $terms Array + * @param $query String + * @param $customCaptions Array: iw prefix -> caption */ protected function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions) { wfProfileIn( __METHOD__ ); @@ -731,8 +734,9 @@ class SpecialSearch { /** * Generates the power search box at bottom of [[Special:Search]] - * @param $term string: search term - * @return $out string: HTML form + * + * @param $term String: search term + * @return String: HTML form */ protected function powerSearchBox( $term ) { global $wgScript, $wgContLang; @@ -969,7 +973,16 @@ class SpecialSearch { return $out . $this->didYouMeanHtml; } - /** Make a search link with some target namespaces */ + /** + * Make a search link with some target namespaces + * + * @param $term String + * @param $namespaces Array + * @param $label String: link's text + * @param $tooltip String: link's tooltip + * @param $params Array: query string parameters + * @return String: HTML fragment + */ protected function makeSearchLink( $term, $namespaces, $label, $tooltip, $params=array() ) { $opt = $params; foreach( $namespaces as $n ) { @@ -997,7 +1010,12 @@ class SpecialSearch { ); } - /** Check if query starts with image: prefix */ + /** + * Check if query starts with image: prefix + * + * @param $term String: the string to check + * @return Boolean + */ protected function startsWithImage( $term ) { global $wgContLang; @@ -1008,7 +1026,12 @@ class SpecialSearch { return false; } - /** Check if query starts with all: prefix */ + /** + * Check if query starts with all: prefix + * + * @param $term String: the string to check + * @return Boolean + */ protected function startsWithAll( $term ) { $allkeyword = wfMsgForContent('searchall'); -- 2.20.1