Commit graph

3096 commits

Author SHA1 Message Date
Translation updater bot eee2cbcdd5 Localisation updates from https://translatewiki.net.
Change-Id: I5b3517a184447bee528af12d7b02f301d555c300
2016-05-16 22:41:54 +02:00
jenkins-bot 772666b4eb Merge "Follow-up f5e9d4e: log parsing failures and API errors too" 2016-05-16 17:03:56 +00:00
Stephane Bisson 8d351ebe45 New error message for failed to fetch notifications
Bug: T129764
Change-Id: Id35d203964ffce9d03b3083e0c0d9c0eeb3b6099
2016-05-16 08:56:25 -04:00
Translation updater bot 767321cdd4 Localisation updates from https://translatewiki.net.
Change-Id: Ib992d87e1184ea8413d0169a9d12d3fea7c43e4d
2016-05-15 22:27:49 +02:00
Translation updater bot 47545312b7 Localisation updates from https://translatewiki.net.
Change-Id: I30814ccc130961687efbf5e74532fa149f2af68e
2016-05-14 22:43:33 +02:00
jenkins-bot 397d402a5b Merge "Avoid exceptions when event_extra can't be unserialized" 2016-05-14 00:45:56 +00:00
jenkins-bot 5a2faf26da Merge "HTML email formatter using presentation model" 2016-05-14 00:29:30 +00:00
jenkins-bot ae571b55dd Merge "Handle section-text being null" 2016-05-13 23:57:41 +00:00
jenkins-bot ff780827e2 Merge "Use JSON instead of PHP-serialized for internal cross-wiki API requests" 2016-05-13 23:41:09 +00:00
Roan Kattouw d2f899d9d3 Handle section-text being null
This was causing warnings in production:
Invalid parameter for message "notification-body-edit-user-talk-with-section": a:1:{s:9:"plaintext";N;}

Change-Id: Ibdea5d899caf446a8c7f811416fdabaa3dccccdd
2016-05-13 16:39:59 -07:00
Kunal Mehta 64127cd815 Avoid exceptions when event_extra can't be unserialized
Check for proper unserialization in EchoEvent::loadFromRow(), and return
false if not possible. Callers were updated to check for a false return.

Bug: T73489
Change-Id: I33867aa9bbbc5f0ecfe0d2a9e1b03eb1a937ae83
2016-05-13 16:39:17 -07:00
Roan Kattouw bc641732e5 Use JSON instead of PHP-serialized for internal cross-wiki API requests
Change-Id: I12e211b454366405e10b7a9706d4be12aab2849e
2016-05-13 16:28:30 -07:00
Roan Kattouw 62908b5cf9 Don't reuse CentralAuth tokens for multiple requests
CA tokens are single-use, and the fact that they even worked
for multiple requests was a race condition. Instead of getting
one CA token and using it for all requests, get a fresh token
for each request.

Bug: T135250
Change-Id: Ie1bbdefd3e265d009d0c42ff27da447b8da7f1fd
2016-05-13 16:13:36 -07:00
Roan Kattouw c7bdb879e6 Follow-up f5e9d4e: log parsing failures and API errors too
Change-Id: Ie00994008aab632a9b02d11b840457e91546b12a
2016-05-13 15:52:33 -07:00
jenkins-bot 712109fa5d Merge "Log warning on failure to fetch foreign notifications" 2016-05-13 21:42:20 +00:00
Roan Kattouw 0e2f1a9c18 Add $wgEchoCrossWikiNotifications flag to disable cross-wiki notifications
This is needed because global tables and cache keys will attempt to be used
even for users who don't have the preference enabled.

Bug: T135266
Change-Id: I6208a12d46c8cd0275a232663cd50ac2bd2fed1c
2016-05-13 13:52:54 -07:00
Stephane Bisson f5e9d4e372 Log warning on failure to fetch foreign notifications
Change-Id: I92bc0ea2aebc1992d43dc0cd560137090b4d5857
2016-05-13 16:42:15 -04:00
jenkins-bot 95049e48fe Merge "Bump cache version for cache pollution (cross-wiki on non-SUL wikis)" 2016-05-13 20:36:04 +00:00
Translation updater bot 0f8e26c617 Localisation updates from https://translatewiki.net.
Change-Id: I253c5a4d7864415c56e42692921fcf71cbae99f4
2016-05-13 22:20:12 +02:00
Matthew Flaschen 9f5a71874f Bump cache version for cache pollution (cross-wiki on non-SUL wikis)
Bug: T135246
Change-Id: Ic01fe394829cca27ad22a37f08364566e26f646a
2016-05-13 15:58:50 -04:00
Stephane Bisson 52b60075d1 Handle empty foreign notification sources
Foreign notification sources can end up being empty
for legitimate reasons (already marked as read on the
foreign wiki) or errors (failed to query remote server).

This change makes the front-end resilient by
removing the sources if they end up being empty,
and removing the foreign notifications bundle if
all the sources end up being empty.

Bug: T135252
Bug: T135250
Change-Id: I5901bb0007420a19d8c0727faa982eb00809c074
2016-05-13 15:42:58 -04:00
Stephane Bisson 413206d82a Pass source url when creating API handler
Change-Id: I8e42c6678766baea1b8b1f66537ec15b1f2bdff7
2016-05-13 14:54:38 -04:00
Matthias Mullie 876197b520 Get rid of addApiHandler factory
Some complexity is now gone. We didn't currently have a good justification
for a the APIHandler factory: the apiHandler caller would have to specify
(variable `foreign`) what kind of handler it would like to initiate anyway,
so it might as well just inject the object (which makes the code easier to
follow, decreases bugs risk because there are less code paths)

This also gives the caller more control of the API handlers:
registerForeignSources will now be able to do more. Now it can e.g. create
1 object that is shared for multiple wikis (to do lookups for multiple
wikis at once)

Also renamed addApiHandler to setApiHandler (it just sets the value it needs
without checking if it already existed anyway)

Change-Id: Ie1814c5bf1a1f0e5607033beb506df67f3585b24
2016-05-13 14:11:42 -04:00
Matthias Mullie 84b016e695 Make sure APIHandler has this.api
this.api is used in APIHandler.createNewFetchNotificationPromise,
so we should make sure it always has a valid this.api

Change-Id: Id476661fb427adbbb3c5741737c293c32ad8a27e
2016-05-13 17:29:56 +00:00
jenkins-bot 8c9692e980 Merge "Correctly update locally cached seenTime" 2016-05-13 11:21:37 +00:00
Roan Kattouw d6c2f1a82c Protect against some errors that apparently happen in production
Committing a live hack that I put in to silence errors and notices.

Bug: T135196
Bug: T135197
Change-Id: Ib1b049686f59d69192b33151eea27bc54519c379
2016-05-12 17:56:16 -07:00
Roan Kattouw 468ead1ca1 Correctly update locally cached seenTime
> Object.keys( wgEchoSeenTime );
["alert", "message", "m", "e", "s", "a", "g"]

Bug: T134854
Change-Id: I167e0eba1bad61a683f36218d2c90235f285a3c2
2016-05-12 16:04:24 -07:00
Translation updater bot 6b1a005bb3 Localisation updates from https://translatewiki.net.
Change-Id: I47bfaf4495a7f4ee6ac87d12f69fcfc879defd49
2016-05-12 22:14:01 +02:00
Mark A. Hershberger 50611ad682 Respect editmyprivateinfo for email
Had set this so that users on a corporate wiki couldn't modify their
email, but saw that Echo wasn't respecting it.

Bug: T135152
Change-Id: I1c7840e4f0648ab20ccc89ae281eb86cddad516c
2016-05-12 11:21:10 -07:00
Mark A. Hershberger a78b52e982 Add tmp emacs file to gitignore
Change-Id: I3d6224c8fbe8ecb85ff8a4eac566f364a2fac26c
2016-05-12 13:11:20 -04:00
Stephane Bisson 6f6e10084c HTML email formatter using presentation model
Bug: T121067
Change-Id: I77f466f0b507ffa49a9714ddba95bea8db1d8438
2016-05-12 09:29:24 -04:00
jenkins-bot dcdfb59567 Merge "Add JSDuck support and fix errors" 2016-05-11 21:38:17 +00:00
Moriel Schottlender 2d184c087c Add JSDuck support and fix errors
Change-Id: I7816110862d9ca1b16e2ec9ce842d240bee6b46b
2016-05-11 14:07:12 -07:00
Translation updater bot f5b243550e Merge "Localisation updates from https://translatewiki.net." 2016-05-11 20:31:58 +00:00
Translation updater bot dc184f835d Localisation updates from https://translatewiki.net.
Change-Id: I8aaf968a47c0bbfe529eba882cbf206f6f582c60
2016-05-11 22:25:55 +02:00
Moriel Schottlender 8f5c718a4f Add 'mark section as read' to Special:Notifications
Allow marking notifications as read per 'section' (days) in the
Special:Notifications page.

Bug: T115528
Bug: T134204
Change-Id: I7324a2c693aa92b9327cf8ff98f125293d5fba10
2016-05-11 20:00:24 +00:00
jenkins-bot 4331c30993 Merge "Add mark-as-read button to notifications in Special:Notifications" 2016-05-11 18:42:46 +00:00
jenkins-bot 89791927c9 Merge "Use new OutputPage parameter in OutputPageCheckLastModified hook" 2016-05-11 18:36:22 +00:00
jenkins-bot 69967ae13a Merge "Don't cache pages with outdated global notification counts" 2016-05-11 18:08:53 +00:00
Roan Kattouw b5bec3ad24 Use new OutputPage parameter in OutputPageCheckLastModified hook
Depends-On: I044a5920b703a2d61a74c2d83d184b77caebb8f3
Change-Id: I6c4290baaf1f2d9e5ec098bc4ea2b23762b4f70f
2016-05-11 17:58:44 +00:00
Roan Kattouw d2d420a3c4 Don't cache pages with outdated global notification counts
When updating notification counts, we already called User::invalidateCache(),
which bumps the local user's touched timestamp, which is taken into
account by OutputPage when computing the last-modified timestamp of the response.

However, this only works for one wiki, while the changed global count
needs to be displayed on every wiki. To accomplish this, track the
timestamp of the last update in NotifUser, and hook it into
OutputPageCheckLastModified.

Change-Id: I22c88a017f18a28179906049ee423c2d7e81c939
2016-05-11 10:53:13 -07:00
jenkins-bot 45a5c43e78 Merge "Reset the TitleParser service without messing up the database" 2016-05-11 17:47:01 +00:00
Moriel Schottlender 15a44768f4 Add mark-as-read button to notifications in Special:Notifications
Bug: T115528
Change-Id: I54dba5f86d28a069659d66dede5b7ab9981213aa
2016-05-11 10:41:32 -07:00
Kunal Mehta 1a189964bc Reset the TitleParser service without messing up the database
Calling MediaWikiTestCase::setService() appears to mess up the database,
so just reset it directly with MediaWikiServices, and tear it down to
avoid leaking any state.

Change-Id: Ibfd0a7f98f50506cd8402f966682f320bf715c8a
2016-05-11 10:13:01 -07:00
jenkins-bot 403270f55f Merge "Reset TitleParser service after modifying $wgContLang" 2016-05-11 16:35:29 +00:00
Kunal Mehta 1baa72cf08 Reset TitleParser service after modifying $wgContLang
Needed by I81d48616afd1ab2bde1a5f1d12f4aefb1c866d43

Change-Id: Ic64b0c45b7e6b8420874385f952a0dc4a93e0149
2016-05-11 09:04:33 -07:00
Translation updater bot 6e5c2a2826 Localisation updates from https://translatewiki.net.
Change-Id: Id5b46e4562ae21920c5f0f639555c7d47db8054a
2016-05-10 22:26:44 +02:00
jenkins-bot ad68c688b0 Merge "Avoid invalid API response when server-side cross-wiki requests fail" 2016-05-10 18:19:10 +00:00
jenkins-bot 14d4c67ee7 Merge "Don't apply margin to dotdotdot menu items" 2016-05-10 14:23:49 +00:00
Roan Kattouw 351297caf1 Don't apply margin to dotdotdot menu items
Otherwise the background color on hover doesn't cover the entire item.

Bug: T130677
Change-Id: I7c0a4cd7a77e3ae333e1ea0161bfc909e246c6e6
2016-05-09 15:00:18 -07:00