Merge "Remove patrol config check in User::isAllowed()"
[lhc/web/wiklou.git] / includes / search / SearchEngine.php
index 5770276..3c8d56e 100644 (file)
@@ -33,7 +33,7 @@ class SearchEngine {
        /** @var string */
        public $prefix = '';
 
-       /** @var int[] */
+       /** @var int[]|null */
        public $namespaces = array( NS_MAIN );
 
        /** @var int */
@@ -164,10 +164,10 @@ class SearchEngine {
                $allSearchTerms = array( $searchterm );
 
                if ( $wgContLang->hasVariants() ) {
-                       $allSearchTerms = array_merge(
+                       $allSearchTerms = array_unique( array_merge(
                                $allSearchTerms,
                                $wgContLang->autoConvertToAllVariants( $searchterm )
-                       );
+                       ) );
                }
 
                $titleResult = null;
@@ -293,7 +293,7 @@ class SearchEngine {
         * Set which namespaces the search should include.
         * Give an array of namespace index numbers.
         *
-        * @param array $namespaces
+        * @param int[]|null $namespaces
         */
        function setNamespaces( $namespaces ) {
                $this->namespaces = $namespaces;