Hold number of search results in a data attribute
authorMikhail Popov <mpopov@wikimedia.org>
Thu, 13 Apr 2017 21:49:20 +0000 (14:49 -0700)
committerMikhail Popov <mpopov@wikimedia.org>
Wed, 19 Apr 2017 18:29:45 +0000 (11:29 -0700)
commit489f7e0b54c45e0cdfa711104935efe8b90b75bf
tree7069a82b259e01727357b369a4785d5cabdae611
parent74432560bea07c969125c2c52eac35af706b002b
Hold number of search results in a data attribute

Current way of counting returned search results (e.g. for
Event Logging) relies on counting the appropriate elements
in the search results page's DOM, up to the limit the user
requested (e.g. 20 by default). This allows us to record
the total number and the offset, useful for event logging.
For example, if we wanted to know whether the user viewed
2nd or 3rd set of search results.

Change-Id: Ic8601e9eeddac84ba8e0d7dc6f127bf360b6f90f
includes/widget/search/SearchFormWidget.php