mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Revert "Pass uselang=user to the API instead of figuring it out client side"
This breaks pages using ?uselang=xx where "xx" is not
the user's language.
This reverts commit 0919b01e75
.
Bug: T103935
Change-Id: I219810451b991cef88bac62cf880bfda6f98e930
This commit is contained in:
parent
bc2c65bbc6
commit
2257dd2a56
|
@ -2,6 +2,8 @@
|
|||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
var useLang = mw.config.get( 'wgUserLanguage' );
|
||||
|
||||
function EchoOverlay( apiResultNotifications ) {
|
||||
this.api = mw.echo.overlay.api;
|
||||
// set internal properties
|
||||
|
@ -82,7 +84,7 @@
|
|||
if ( this.unread.length ) {
|
||||
data = {
|
||||
action: 'echomarkread',
|
||||
uselang: 'user'
|
||||
uselang: useLang
|
||||
};
|
||||
if ( id ) {
|
||||
// If id is given mark that as read otherwise use all unread messages
|
||||
|
@ -458,7 +460,7 @@
|
|||
notformat: 'flyout',
|
||||
notlimit: this.notificationLimit,
|
||||
notprop: 'index|list|count',
|
||||
uselang: 'user'
|
||||
uselang: useLang
|
||||
};
|
||||
|
||||
return this.api.get( apiData ).then( function ( result ) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
var useLang = mw.config.get( 'wgUserLanguage' );
|
||||
|
||||
mw.echo.special = {
|
||||
|
||||
|
@ -67,7 +68,7 @@
|
|||
notprop: 'index|list',
|
||||
notcontinue: this.notcontinue,
|
||||
notlimit: mw.config.get( 'wgEchoDisplayNum' ),
|
||||
uselang: 'user'
|
||||
uselang: useLang
|
||||
};
|
||||
|
||||
api.get( apiData ).done( function ( result ) {
|
||||
|
@ -129,7 +130,7 @@
|
|||
api.postWithToken( 'edit', {
|
||||
action: 'echomarkread',
|
||||
list: unread.join( '|' ),
|
||||
uselang: 'user'
|
||||
uselang: useLang
|
||||
} ).done( function ( result ) {
|
||||
// update the badge if the link is enabled
|
||||
if ( result.query.echomarkread.count !== undefined &&
|
||||
|
|
Loading…
Reference in a new issue