jenkins-bot has submitted this change and it was merged.
Change subject: Don't return a value from Schema.log
......................................................................
Don't return a value from Schema.log
EventLogging's mw.eventLog.logEvent() returns a deferred that is meant to be
resolved if the logging call wass successful and rejected otherwise. I'd like
to do away with that return value for two reasons: (a) when we use
navigator.sendBeacon, there is no way to find out the ultimate status of the
request; (b) there is nothing useful the calling code can do with the result,
anyway.
MobileFrontend doesn't appear to do anything with the deferred return value, so
it can be removed quite easily.
Change-Id: Ia383d091e5a55c32287c650f9bac44d7a21f6fc6
---
M javascripts/Schema.js
1 file changed, 1 insertion(+), 4 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
Phuedx: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/javascripts/Schema.js b/javascripts/Schema.js
index 046e762..d2ebf50 100644
--- a/javascripts/Schema.js
+++ b/javascripts/Schema.js
@@ -42,13 +42,10 @@
*
* @method
* @param {Object} data to log
- * @return {jQuery.Deferred}
*/
log: function ( data ) {
if ( mw.eventLog ) {
- return mw.eventLog.logEvent( this.name,
$.extend( this.defaults, data ) );
- } else {
- return $.Deferred().reject( 'EventLogging not
installed.' );
+ mw.eventLog.logEvent( this.name, $.extend(
this.defaults, data ) );
}
}
} );
--
To view, visit https://gerrit.wikimedia.org/r/184280
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia383d091e5a55c32287c650f9bac44d7a21f6fc6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits