Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/184280
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/80/184280/1
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: newchange
Gerrit-Change-Id: Ia383d091e5a55c32287c650f9bac44d7a21f6fc6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits