build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
[lhc/web/wiklou.git] / includes / widget / search / SearchFormWidget.php
index b8d415f..2c88563 100644 (file)
@@ -103,7 +103,11 @@ class SearchFormWidget {
                if ( $totalResults > 0 && $offset < $totalResults ) {
                        $html .= Xml::tags(
                                'div',
-                               [ 'class' => 'results-info' ],
+                               [
+                                       'class' => 'results-info',
+                                       'data-mw-num-results-offset' => $offset,
+                                       'data-mw-num-results-total' => $totalResults
+                               ],
                                $this->specialSearch->msg( 'search-showingresults' )
                                        ->numParams( $offset + 1, $offset + $numResults, $totalResults )
                                        ->numParams( $numResults )
@@ -149,10 +153,9 @@ class SearchFormWidget {
                        );
                }
 
-               return
-                               "<div class='search-types'>" .
-                                       "<ul>" . implode( '', $items ) . "</ul>" .
-                               "</div>";
+               return "<div class='search-types'>" .
+                       "<ul>" . implode( '', $items ) . "</ul>" .
+               "</div>";
        }
 
        /**
@@ -206,16 +209,13 @@ class SearchFormWidget {
         */
        protected function optionsHtml( $term, $isPowerSearch, $profile ) {
                $html = '';
-               $opts = [
-                       'profile' => $profile,
-               ];
 
                if ( $isPowerSearch ) {
-                       $html .= $this->powerSearchBox( $term, $opts );
+                       $html .= $this->powerSearchBox( $term, [] );
                } else {
                        $form = '';
                        Hooks::run( 'SpecialSearchProfileForm', [
-                               $this->specialSearch, &$form, $profile, $term, $opts
+                               $this->specialSearch, &$form, $profile, $term, []
                        ] );
                        $html .= $form;
                }
@@ -297,19 +297,18 @@ class SearchFormWidget {
                        );
                }
 
-               return
-                       "<fieldset id='mw-searchoptions'>" .
-                               "<legend>" . $this->specialSearch->msg( 'powersearch-legend' )->escaped() . '</legend>' .
-                               "<h4>" . $this->specialSearch->msg( 'powersearch-ns' )->parse() . '</h4>' .
-                               // populated by js if available
-                               "<div id='mw-search-togglebox'></div>" .
-                               $divider .
-                               implode(
-                                       $divider,
-                                       $showSections
-                               ) .
-                               $hidden .
-                               $remember .
-                       "</fieldset>";
+               return "<fieldset id='mw-searchoptions'>" .
+                       "<legend>" . $this->specialSearch->msg( 'powersearch-legend' )->escaped() . '</legend>' .
+                       "<h4>" . $this->specialSearch->msg( 'powersearch-ns' )->parse() . '</h4>' .
+                       // populated by js if available
+                       "<div id='mw-search-togglebox'></div>" .
+                       $divider .
+                       implode(
+                               $divider,
+                               $showSections
+                       ) .
+                       $hidden .
+                       $remember .
+               "</fieldset>";
        }
 }