Commit graph

5589 commits

Author SHA1 Message Date
Roan Kattouw 06f0a7a6d5 NotifUser: Remove basically-unused talk notification cache
This cache was only used so that, if we're told to clear the newtalk
flag and we already know there are no edit-user-talk notifications, we
won't try to delete them. But that's not a good justification for such a
confusingly-written cache that would have been hard to convert to
getWithSetCallback(), and I'm concerned that using cached data to make
this decision could lead to inconsistencies.

Also remove the notifCountHasReachedMax() check, which made no sense: if
the user has >99 notifications, that is no justification for not marking
their user talk notifications as read when they visit their user talk
page. Whether the displayed notification count will change has no
bearing on whether these notifications should be marked as read (and now
that bundled notifications are counted individually, the displayed count
actually could change).

Bug: T164860
Change-Id: I3ff5c9b31307839b9336bd8856015db9baa52fad
2018-08-09 16:34:04 -07:00
Roan Kattouw a9afcfb43a UserNotificationGateway: Use batching in markRead() and markUnread()
Change-Id: I85452d0f0afe974d26a575e000f6ae2ceeddf06c
2018-08-09 16:34:04 -07:00
jenkins-bot 8151b212ee Merge "Clean up EventLogging integration" 2018-08-09 21:54:37 +00:00
Translation updater bot 397a954cf1 Localisation updates from https://translatewiki.net.
Change-Id: I7721e19744b7d1322909a31efcf6cabd39b602df
2018-08-09 22:23:42 +02:00
jenkins-bot 2e56ca2d4b Merge "NotificationMapper: Use batching in deleteByUserEventOffset()" 2018-08-09 18:52:07 +00:00
Kunal Mehta b574e252f8 Clean up EventLogging integration
* Move revision ids out of configuration and into MWEchoEventLogging
class. Because the EchoInteraction schema is used both server and
client, we have to duplicate the revision id.
* Use EventLoggingSchemas attribute to register client-side schema in
extension.json instead of a hook.
* Check if EventLogging is enabled in MWEchoEventLogging instead of
$wgExtensionFunctions.
* Pass only whether the EchoInteraction schema is enabled to the
client-side instead of all of $wgEchoEventLoggingSchemas.

Change-Id: I968294f96cedac19dc9d8f53df14fecfb666ceee
2018-08-09 14:19:45 +00:00
jenkins-bot 66c6c63813 Merge "Remove $wgEchoEventLoggingSchemas qunit hack" 2018-08-08 23:57:10 +00:00
jenkins-bot 536d632d14 Merge "Move ext.echo.logger module registration to extension.json" 2018-08-08 23:56:38 +00:00
jenkins-bot 679d892340 Merge "Use mw.track() to submit EventLogging data client-side" 2018-08-08 23:56:36 +00:00
Roan Kattouw fe17b49fcd NotificationMapper: Use batching in deleteByUserEventOffset()
Also test it more meaningfully by setting up a mock database and
asserting that the right DELETE queries are issued.

Change-Id: Id39723b92118e98d9c9f0cd7381e9396dce67c17
2018-08-08 14:57:58 -07:00
Translation updater bot 0068b5b2cd Localisation updates from https://translatewiki.net.
Change-Id: I1842ad97effef4295517b1ac9957fdd2c490b162
2018-08-08 22:13:39 +02:00
petarpetkovic 00447385bd Fix 'Methds' typo
Bug: T201491
Change-Id: I5a2ef9924591bee15da3d9e94d84826d1e11e4d5
2018-08-08 13:27:02 +02:00
Translation updater bot 81767d8044 Localisation updates from https://translatewiki.net.
Change-Id: I0d2ac117553f49c50bed4fd6a8e60177a3adc3d8
2018-08-07 22:31:42 +02:00
Umherirrender 910308f02a Remove [] from optional param doc
Change-Id: I6d6cf538b986e0fe7ec8c9f7a6279f8e1f7023a9
2018-08-07 08:28:28 +02:00
Translation updater bot 4cbeac9024 Localisation updates from https://translatewiki.net.
Change-Id: I74caafcb55f67d89b7522f91dd0375965af532a5
2018-08-06 22:21:42 +02:00
Translation updater bot f4c63483d6 Localisation updates from https://translatewiki.net.
Change-Id: Ic9dce47e228c37dfccc0e5d12ff3b1785437bae3
2018-08-02 22:19:15 +02:00
Translation updater bot fcbc955eb0 Localisation updates from https://translatewiki.net.
Change-Id: Iebc952a66bf6e69972ae4289043b6a71a2c945ef
2018-08-01 22:10:26 +02:00
Translation updater bot 68a1eb35b7 Localisation updates from https://translatewiki.net.
Change-Id: I9fdf44dbb4485e0dacd6ddaebddbc5e917ff154c
2018-07-31 22:33:02 +02:00
Translation updater bot 0c9fc8a8df Localisation updates from https://translatewiki.net.
Change-Id: I9785f6dca2cb5fb7fe4852d71ed36e5ab3c33b2b
2018-07-28 22:29:41 +02:00
Translation updater bot 26f85eca10 Localisation updates from https://translatewiki.net.
Change-Id: Ia1db505ceb5a9f1682a7fc01b88709b386c0df99
2018-07-27 22:17:46 +02:00
libraryupgrader 6e7699f213 build: Updating mediawiki/mediawiki-codesniffer to 21.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation

Change-Id: Ic47b8d7162022f983ad00a7337fa0ce6f18d2c83
2018-07-27 05:31:24 +00:00
Kunal Mehta 832d9d4d16 Remove $wgEchoEventLoggingSchemas qunit hack
The only place that reads the config variable is in ext.echo.logger,
which uses OO.getProp() to do so. If that property doesn't exist,
`undefined` will be returned, which we can force to boolean false.

Bug: T118488
Change-Id: Iac352b133950f6f2e4b88950c1fcd0c893284fd9
2018-07-26 19:34:42 -07:00
Kunal Mehta 2f5581c30a Move ext.echo.logger module registration to extension.json
Change-Id: Iec48ff2f2362f5861ee52fde3394a820f9cb2d07
2018-07-26 19:34:42 -07:00
Kunal Mehta 9a828c7b56 Use mw.track() to submit EventLogging data client-side
This avoids needing any dependencies on EventLogging in the module
definition, as well as allowing the extra dependencies to be lazy-loaded
as necessary.

Change-Id: I49b5be4be4f55cd4e27064247463b2ddb8e81296
2018-07-26 19:34:37 -07:00
Kunal Mehta 9f2383a727 Use UserGetDefaultOptions hook instead of $wgExtensionFunctions
$wgExtensionFunctions are run on every MediaWiki request, and should be
avoided unless necessary. Default user options should be controlled by
the UserGetDefaultOptions hook instead.

Bug: T180192
Change-Id: I2a79e078753d289c3ea2f04b613ce72c59a9e59a
2018-07-25 17:19:17 -07:00
Translation updater bot 70d07878c9 Localisation updates from https://translatewiki.net.
Change-Id: Id1c214b3f242d7d6d181de7db4074c703129df4c
2018-07-25 22:18:05 +02:00
Aryeh Gregor 83be57fe01 Use setContentLang instead of setMwGlobals
This sets $wgLanguageCode appropriately.  It will also be necessary when
$wgContLang becomes a service, in which case setting the global directly
will not work correctly.

Bug: T200246
Change-Id: I4aaf1c641ec6abef214eb96c0e4b42a67488ac00
2018-07-25 19:12:09 +03:00
Translation updater bot 6e0339b7e0 Localisation updates from https://translatewiki.net.
Change-Id: I8797ef079a5f1e73d9b600c401503d3551f54316
2018-07-24 22:09:50 +02:00
Translation updater bot dff8f98962 Localisation updates from https://translatewiki.net.
Change-Id: Ic70320019f774b24be95fb06a0473566a299d053
2018-07-23 22:31:05 +02:00
Translation updater bot e3c92db4f7 Localisation updates from https://translatewiki.net.
Change-Id: I5ed2469ae3d036283b8bf7ff838d00295d873fb8
2018-07-22 22:08:45 +02:00
jenkins-bot 2041517cfd Merge "Get rid of special casing for user blacklist" 2018-07-17 20:46:21 +00:00
Translation updater bot b3e09bf3e7 Localisation updates from https://translatewiki.net.
Change-Id: I6aacc55f44f936a579087dc44c62e9eef904288d
2018-07-17 22:13:49 +02:00
Translation updater bot 6d629dd3d6 Localisation updates from https://translatewiki.net.
Change-Id: I1e4bba2336677e8ed67b6a3e88bf382723ea36d4
2018-07-15 22:10:53 +02:00
Translation updater bot d4ef4b1ac3 Localisation updates from https://translatewiki.net.
Change-Id: I994a5d412d064c4a06382e8615ace8a85e11985d
2018-07-14 22:20:28 +02:00
Translation updater bot a178f50680 Localisation updates from https://translatewiki.net.
Change-Id: Ia2b2e567b54a362463a553f7cf07debf8e86e05a
2018-07-12 22:38:33 +02:00
Translation updater bot 84ee4bbe75 Localisation updates from https://translatewiki.net.
Change-Id: Idb24461a1bbdffd93fd9f5b1c0f8355427419bac
2018-07-11 22:39:36 +02:00
Translation updater bot 2b81b4cee0 Localisation updates from https://translatewiki.net.
Change-Id: I3ebb2e7f0e5c65a6bd74bdec0004229c43b78839
2018-07-10 22:15:52 +02:00
Max Semenik f8ef0cc7f5 Get rid of special casing for user blacklist
Makes so many things simpler and robust.

Bug: T198935
Change-Id: Ia836f8f497cae8599f85cf86a7f6b299cd012e81
Depends-On: Iff63da0d215585cfcf083e7f7ec8ed45d5b77301
2018-07-09 15:50:38 -07:00
Translation updater bot 6e5d7a477d Localisation updates from https://translatewiki.net.
Change-Id: I894ce3471b3c68b0a92a8e1359902c910809985d
2018-07-09 22:10:57 +02:00
jenkins-bot b4ef9e7115 Merge "Remove some non-helpful lines of documentation" 2018-07-06 21:36:51 +00:00
Thiemo Kreuz 75a55b80ee Remove some non-helpful lines of documentation
Explaining that a variable named "$username" contains a "username" is
not helpful. One have to read this comment first to understand that it
does not add anything to what's already obvious from the variable name
and the type.

Change-Id: I9a43866498d0c94422caf16233f502320a8e36c9
2018-07-06 15:14:44 +00:00
Željko Filipin 2abc4a9256 Selenium: Create selenium-daily npm script
The script is needed for the new Docker-based Jenkins jobs (running daily and targeting beta cluster).

Bug: T188742
Change-Id: I1cca2398857c693d9a8f4dbbb2cf9d25b5124f83
2018-07-06 14:45:09 +00:00
Stephane Bisson 10a99b016b Handle missing presentation model
When a presentation model is specified for an event type,
check if the class actually exist before trying to use it.
Logs to debug when the class is not specified or doesn't exist.

This is useful for extensions that get undeployed
(looking at you, OpenStackManager). Their notifications
cannot really render since the code to render them
is not available anymore. This make them simply go away and
the notification counts get updated shortly after because
unrenderable notifications are marked as deleted.

Bug: T195253
Change-Id: I6335204942002bba3e73887ab81e55a27b4e181a
2018-07-03 12:49:20 -04:00
Translation updater bot 122718bc24 Localisation updates from https://translatewiki.net.
Change-Id: I77a5bf467c49fae72f01897cdd4af318dbf8048c
2018-07-01 22:06:10 +02:00
Translation updater bot 74839a00fb Localisation updates from https://translatewiki.net.
Change-Id: I5ac1af9f1977fcbeaa0e1ada60d477fcdc40c30a
2018-06-30 22:30:23 +02:00
jenkins-bot 7862759c53 Merge "Re-enable test coverage reporting, add @covers tags" 2018-06-28 17:02:18 +00:00
jenkins-bot 65470a8d10 Merge "Add timestamps to generated notifications" 2018-06-28 13:09:29 +00:00
Kosta Harlan da2da90b48 Re-enable test coverage reporting, add @covers tags
Bug: T195136
Change-Id: I9203232e79f162aedb982b713f708cebfe9d1ae0
2018-06-28 08:32:57 -04:00
Translation updater bot d956799dbf Localisation updates from https://translatewiki.net.
Change-Id: I2806e0d9d21b5393e427e2e83e8fbb5c06980d03
2018-06-27 22:18:51 +02:00
Moriel Schottlender 592bc476b2 Add timestamps to generated notifications
Add the ability to create notifications with specific timestamps
when generating notifications through the maintenance script.

Note, that not all notifications can be given specific timestamp;
only notifications that do not involve a direct editing action
will be given this timestamp and their events will be created
as if the actions were taken at the given timestamp, with
1 minute intervals.

Change-Id: I9e6b8660178ca0734979946c8e6ec8d43fc3de41
2018-06-27 11:16:22 -07:00