From 75bf99124ab6c5f567123f8190b59d1ba4bb7700 Mon Sep 17 00:00:00 2001 From: Amire80 Date: Thu, 15 Mar 2018 11:07:59 +0200 Subject: [PATCH] Parse the parameters to no-results-found event as an object This fixes a bug in I2ff9ce9b40df16ed3c5e6970fb3b691af08cedec Bug: T179402 Change-Id: I770211c666ad530f6a4bb618c6f2c3521aa05a8e --- resources/js/ext.uls.eventlogger.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/js/ext.uls.eventlogger.js b/resources/js/ext.uls.eventlogger.js index 32c08ca5..6e0f5511 100644 --- a/resources/js/ext.uls.eventlogger.js +++ b/resources/js/ext.uls.eventlogger.js @@ -238,14 +238,13 @@ * Log search strings which produce no search results. * * @param {jQuery.event} event The original event - * @param {string} context The query string - * @param {string} ulsPurpose The ulsPurpose option of the ULS panel that triggered the event + * @param {Object} data Information about the failed search */ - noSearchResults: function ( event, context, ulsPurpose ) { + noSearchResults: function ( event, data ) { this.log( { action: 'no-search-results', - context: context, - ulsPurpose: ulsPurpose, + context: data.query, + ulsPurpose: data.ulsPurpose, title: mw.config.get( 'wgPageName' ) } ); }