Merge "registration: Support Change/RemoveCredentialsBlacklist in extension.json"
[lhc/web/wiklou.git] / includes / specials / SpecialSearch.php
index b98ddda..45d2415 100644 (file)
@@ -485,7 +485,9 @@ class SpecialSearch extends SpecialPage {
        protected function getDidYouMeanHtml( SearchResultSet $textMatches ) {
                # mirror Go/Search behavior of original request ..
                $params = [ 'search' => $textMatches->getSuggestionQuery() ];
-               if ( $this->fulltext != null ) {
+               if ( $this->fulltext === null ) {
+                       $params['fulltext'] = 'Search';
+               } else {
                        $params['fulltext'] = $this->fulltext;
                }
                $stParams = array_merge( $params, $this->powerSearchOptions() );
@@ -519,7 +521,9 @@ class SpecialSearch extends SpecialPage {
                // Search instead for '$orig'
 
                $params = [ 'search' => $textMatches->getQueryAfterRewrite() ];
-               if ( $this->fulltext != null ) {
+               if ( $this->fulltext === null ) {
+                       $params['fulltext'] = 'Search';
+               } else {
                        $params['fulltext'] = $this->fulltext;
                }
                $stParams = array_merge( $params, $this->powerSearchOptions() );
@@ -1162,7 +1166,8 @@ class SpecialSearch extends SpecialPage {
         * @return string
         */
        protected function searchProfileTabs( $term ) {
-               $out = Xml::openElement( 'div', [ 'class' => 'mw-search-profile-tabs' ] );
+               $out = Html::element( 'div', [ 'class' => 'visualClear' ] ) .
+                       Xml::openElement( 'div', [ 'class' => 'mw-search-profile-tabs' ] );
 
                $bareterm = $term;
                if ( $this->startsWithImage( $term ) ) {
@@ -1261,8 +1266,7 @@ class SpecialSearch extends SpecialPage {
                                ->numParams( $this->offset + 1, $this->offset + $resultsShown, $totalNum )
                                ->numParams( $resultsShown )
                                ->parse();
-                       $out .= Xml::tags( 'div', [ 'class' => 'results-info' ], $top ) .
-                               Xml::element( 'div', [ 'style' => 'clear:both' ], '', false );
+                       $out .= Xml::tags( 'div', [ 'class' => 'results-info' ], $top );
                }
 
                return $out;