Merge "Fix sessionfailure i18n message during authentication"
[lhc/web/wiklou.git] / includes / widget / SearchInputWidget.php
index 773c291..6fed794 100644 (file)
@@ -1,14 +1,12 @@
 <?php
-/**
- * MediaWiki Widgets – SearchInputWidget class.
- *
- * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
- * @license The MIT License (MIT); see LICENSE.txt
- */
+
 namespace MediaWiki\Widget;
 
 /**
  * Search input widget.
+ *
+ * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
+ * @license MIT
  */
 class SearchInputWidget extends TitleInputWidget {
 
@@ -20,13 +18,13 @@ class SearchInputWidget extends TitleInputWidget {
 
        /**
         * @param array $config Configuration options
-        * @param int|null $config['pushPending'] Whether the input should be visually marked as
-        *  "pending", while requesting suggestions (default: false)
-        * @param bool|null $config['performSearchOnClick'] If true, the script will start a search
-        *  whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the
-        *  text field only (default: true)
-        * @param string $config['dataLocation'] Where the search input field will be
-        *  used (header or content, default: header)
+        *   - int|null $config['pushPending'] Whether the input should be visually marked as
+        *     "pending", while requesting suggestions (default: false)
+        *   - bool|null $config['performSearchOnClick'] If true, the script will start a search
+        *     whenever a user hits a suggestion. If false, the text of the suggestion is inserted into
+        *     the text field only (default: true)
+        *   - string $config['dataLocation'] Where the search input field will be
+        *     used (header or content, default: header)
         */
        public function __construct( array $config = [] ) {
                $config = array_merge( [
@@ -34,7 +32,6 @@ class SearchInputWidget extends TitleInputWidget {
                        'icon' => 'search',
                ], $config );
 
-               // Parent constructor
                parent::__construct( $config );
 
                // Properties, which are ignored in PHP and just shipped back to JS
@@ -69,6 +66,7 @@ class SearchInputWidget extends TitleInputWidget {
                if ( $this->dataLocation ) {
                        $config['dataLocation'] = $this->dataLocation;
                }
+               $config['$overlay'] = true;
                return parent::getConfig( $config );
        }
 }