Merge "Hold number of search results in a data attribute"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 20 Apr 2017 19:04:16 +0000 (19:04 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 20 Apr 2017 19:04:16 +0000 (19:04 +0000)
includes/widget/search/SearchFormWidget.php

index a7407a0..008ed19 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 )