X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fsearch%2FSearchEngine.php;h=827d8c31d7ccf30983cf3f630b4c25736ed398b8;hb=85c05d41c52125f635162d7d1e8994b82ece7da1;hp=687f9a42044f839749c1a23213c72c5dcfbd3baa;hpb=423a6f7367b5b068c48a64be167d67d9ebbe9e55;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 687f9a4204..827d8c31d7 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -37,7 +37,7 @@ class SearchEngine { var $namespaces = array( NS_MAIN ); protected $showSuggestion = true; - /** @var Array Feature values */ + /** @var array Feature values */ protected $features = array(); /** @@ -45,7 +45,7 @@ class SearchEngine { * If title searches are not supported or disabled, return null. * STUB * - * @param string $term raw search term + * @param string $term Raw search term * @return SearchResultSet|Status|null */ function searchText( $term ) { @@ -57,7 +57,7 @@ class SearchEngine { * If title searches are not supported or disabled, return null. * STUB * - * @param string $term raw search term + * @param string $term Raw search term * @return SearchResultSet|null */ function searchTitle( $term ) { @@ -66,8 +66,8 @@ class SearchEngine { /** * @since 1.18 - * @param $feature String - * @return Boolean + * @param string $feature + * @return bool */ public function supports( $feature ) { switch ( $feature ) { @@ -82,8 +82,8 @@ class SearchEngine { /** * Way to pass custom data for engines * @since 1.18 - * @param $feature String - * @param $data Mixed + * @param string $feature + * @param mixed $data * @return bool */ public function setFeatureData( $feature, $data ) { @@ -117,7 +117,7 @@ class SearchEngine { * If an exact title match can be found, or a very slightly close match, * return the title. If no match, returns NULL. * - * @param $searchterm String + * @param string $searchterm * @return Title */ public static function getNearMatch( $searchterm ) { @@ -131,7 +131,7 @@ class SearchEngine { * Do a near match (see SearchEngine::getNearMatch) and wrap it into a * SearchResultSet. * - * @param $searchterm string + * @param string $searchterm * @return SearchResultSet */ public static function getNearMatchResultSet( $searchterm ) { @@ -262,8 +262,8 @@ class SearchEngine { * Set the maximum number of results to return * and how many to skip before returning the first. * - * @param $limit Integer - * @param $offset Integer + * @param int $limit + * @param int $offset */ function setLimitOffset( $limit, $offset = 0 ) { $this->limit = intval( $limit ); @@ -274,7 +274,7 @@ class SearchEngine { * Set which namespaces the search should include. * Give an array of namespace index numbers. * - * @param $namespaces Array + * @param array $namespaces */ function setNamespaces( $namespaces ) { $this->namespaces = $namespaces; @@ -285,7 +285,7 @@ class SearchEngine { * don't support building a suggestion in the first place and others don't respect * this flag. * - * @param boolean $showSuggestion should the searcher try to build suggestions + * @param bool $showSuggestion Should the searcher try to build suggestions */ function setShowSuggestion( $showSuggestion ) { $this->showSuggestion = $showSuggestion; @@ -295,7 +295,7 @@ class SearchEngine { * Parse some common prefixes: all (search everything) * or namespace names * - * @param $query String + * @param string $query * @return string */ function replacePrefixes( $query ) { @@ -330,7 +330,7 @@ class SearchEngine { /** * Make a list of searchable namespaces and their canonical names. - * @return Array + * @return array */ public static function searchableNamespaces() { global $wgContLang; @@ -349,8 +349,8 @@ class SearchEngine { * Extract default namespaces to search from the given user's * settings, returning a list of index numbers. * - * @param $user User - * @return Array + * @param user $user + * @return array */ public static function userNamespaces( $user ) { global $wgSearchEverythingOnlyLoggedIn; @@ -378,7 +378,7 @@ class SearchEngine { /** * Find snippet highlight settings for all users * - * @return Array contextlines, contextchars + * @return array Contextlines, contextchars */ public static function userHighlightPrefs() { $contextlines = 2; // Hardcode this. Old defaults sucked. :) @@ -389,7 +389,7 @@ class SearchEngine { /** * An array of namespaces indexes to be searched by default * - * @return Array + * @return array */ public static function defaultNamespaces() { global $wgNamespacesToBeSearchedDefault; @@ -401,7 +401,7 @@ class SearchEngine { * Get a list of namespace names useful for showing in tooltips * and preferences * - * @param $namespaces Array + * @param array $namespaces * @return array */ public static function namespacesAsText( $namespaces ) { @@ -419,7 +419,7 @@ class SearchEngine { /** * Return the help namespaces to be shown on Special:Search * - * @return Array + * @return array */ public static function helpNamespaces() { global $wgNamespacesToBeSearchedHelp; @@ -430,8 +430,8 @@ class SearchEngine { /** * Return a 'cleaned up' search string * - * @param $text String - * @return String + * @param string $text + * @return string */ function filter( $text ) { $lc = $this->legalSearchChars(); @@ -442,7 +442,7 @@ class SearchEngine { * Load up the appropriate search engine class for the currently * active database backend, and return a configured instance. * - * @param String $type Type of search backend, if not the default + * @param string $type Type of search backend, if not the default * @return SearchEngine */ public static function create( $type = null ) { @@ -484,9 +484,9 @@ class SearchEngine { * Title and text should be pre-processed. * STUB * - * @param $id Integer - * @param $title String - * @param $text String + * @param int $id + * @param string $title + * @param string $text */ function update( $id, $title, $text ) { // no-op @@ -497,8 +497,8 @@ class SearchEngine { * Title should be pre-processed. * STUB * - * @param $id Integer - * @param $title String + * @param int $id + * @param string $title */ function updateTitle( $id, $title ) { // no-op @@ -509,8 +509,8 @@ class SearchEngine { * Title should be pre-processed. * STUB * - * @param Integer $id Page id that was deleted - * @param String $title Title of page that was deleted + * @param int $id Page id that was deleted + * @param string $title Title of page that was deleted */ function delete( $id, $title ) { // no-op @@ -519,7 +519,7 @@ class SearchEngine { /** * Get OpenSearch suggestion template * - * @return String + * @return string */ public static function getOpenSearchTemplate() { global $wgOpenSearchTemplate, $wgCanonicalServer;