Commit graph

5392 commits

Author SHA1 Message Date
Marko Obrovac 6ae3efc1c3 SeenTime: Do not set the cache key to Unix epoch
Now that seen times are TTL'ed, there is little sense/incentive to set
them in the cache to the default value, since we assume the default
value if they're not in cache (which is being set here). Therefore,
setting them only increases the cache size without any gains.

Bug: T222851
Change-Id: I78a0045e4a53653196114da81c2d60328e78c269
2019-10-18 14:23:28 +02:00
Roan Kattouw ff165c0003 Make EchoSeenTime cache entries expire after 1 year
These entries weren't TTLed at all, and so we had millions of records
for inactive users that were being stored forever. If a user doesn't
view their notifications for a year, it's OK for their notifications
badge to go back to the unseen state until they click it.

(The fallback behavior on a cache miss is to act as if the seentime is
the UNIX epoch, which means that any unread notification they have is
more recent than it, and is considered unseen.)

Bug: T222851
Change-Id: I99230d2351b40751a3f2f5123c5f38693120259e
2019-10-18 12:05:52 +00:00
Roan Kattouw 79ee7582f2 Make EchoSeenTime cache type configurable
Defaults to MainStash, but can be configured to use a different cache
backend by setting $wgEchoSeenTimeCacheType to a string that keys into
$wgObjectCaches.

Bug: T222851
Change-Id: Ifb935cc8be4618f7794ee79a234fc66d5cc5728a
2019-10-18 11:32:03 +00:00
Translation updater bot a9dbe0f97b Localisation updates from https://translatewiki.net.
Change-Id: Ib4a6ecdbd6df298d11f758450e4eada47b08c934
2019-10-17 09:52:27 +02:00
Translation updater bot 3d7d1e99d2 Localisation updates from https://translatewiki.net.
Change-Id: I9a6b274f33dc66b9313ad82d8ded74e0659f1552
2019-10-16 20:39:00 +02:00
Zoranzoki21 5a05e94a1e Remove comment related to skins.minerva.scripts after removal of it in 1053997
Bug: T221007
Change-Id: I0ca3e195aa623cff7ef437dc177179dee13c7cd1
2019-10-16 10:30:57 +00:00
jenkins-bot c7215f9f5f Merge "No longer check for skins.minerva.scripts" 2019-10-16 10:22:27 +00:00
jdlrobson 10539971f1 No longer check for skins.minerva.scripts
Echo is now in complete control. Cleanup after ourselves.

Change-Id: I9a26c7a88f5e3ff19ec5b17b08a0d05c4f9e60ce
Depends-On: I9a6b06158d9083317aea46510c0c47980a25e50a
Bug: T221007
2019-10-16 09:27:24 +00:00
Kosta Harlan ccab496734 Remove PhanTypeMismatchArgument from call to appendContent
Breaking in
https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/16324/console

Change-Id: I9a6b06158d9083317aea46510c0c47980a25e50a
2019-10-16 10:53:12 +02:00
Translation updater bot 8370692e48 Localisation updates from https://translatewiki.net.
Change-Id: I5071cf40b05a347bd22dbed5dab2fabd1b240d56
2019-10-16 10:39:21 +02:00
jenkins-bot c5aa7514ab Merge "build: Upgrade mediawiki-codesniffer to v28.0.0" 2019-10-10 09:40:59 +00:00
James D. Forrester abaff73626 build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: Ib66b0ad1b3929bf7e49eb40a3d5463b0d8b2280b
2019-10-10 09:29:24 +00:00
Translation updater bot 75f111d83c Localisation updates from https://translatewiki.net.
Change-Id: I64eba53377480f1028685a20c40aee411593ce9b
2019-10-10 09:32:41 +02:00
jenkins-bot cd6a340ce8 Merge "Dormant mobile notifications overlay lives in Echo" 2019-10-09 19:50:57 +00:00
jdlrobson d3c0494a17 Dormant mobile notifications overlay lives in Echo
This code will be enabled when Iba1d7863171268066bf7597182c57a0a2041497f
relinquishes the responsibility for rendering the Echo notification badge
and wiring up of the related JS.

It makes 3 assumptions:
1) Minerva will expose a VERSION property on the skins.minerva.scripts module
to tell Echo it can begin control of the functionality
2) A new hook `SkinMinervaReplaceNotificationsBadge` will run on the server side
allowing Echo extension to render the Notifications badge in Minerva.
3) A new client side hook (echo.mobile) will fire whenever the Echo dialog is opened or
closed.

All code relating to Echo inside MobileFrontend and Minerva is
moved here.
CSS for the modules is kept in Minerva as skinStyles

This code remains dormant until Iba1d7863171268066bf7597182c57a0a2041497f lands.
It pre-registers a "to-be-created" hook SkinMinervaReplaceNotificationsBadge that
substitutes the Minerva badge.

It also watches the export value of skins.minerva.scripts for a VERSION value - when
this appears it will take the signal that it should manage the frontend code.

In the new system the mobile specific code is limited to the mobile version of
Minerva. The desktop version of Echo loads on Minerva desktop - presenting an
opportunity in future to consolidate both implementations to use the same component.
The mobile version of Vector and Timeless for example will load the mobile overlay
(with existing styling issues that we don't need to worry about right now given
we don't officially support skins other than Minerva as mobile)

Testers:
* Check require( 'ext.echo.mobile' )(); inside initMobile
inside ext.echo.init does not fire until
Iba1d7863171268066bf7597182c57a0a2041497f is checked out.

Depends-On:  I1a66939d2b596094b419de40b370e79f09c85581
Bug: T221007
Change-Id: I09c27a084100b223662f84de6cbe01bebe1fe774
2019-10-09 12:36:11 -07:00
Translation updater bot 42a70f1814 Localisation updates from https://translatewiki.net.
Change-Id: I97cdc0ec3553cf1845fa0a2bbadd96724d03eafc
2019-10-08 09:32:51 +02:00
Max Semenik 7e9e549743 Use PHPUnit 6 class names
Bug: T192167
Change-Id: Id309ad5933371dd835ec431ded80f650e228099c
2019-10-06 15:23:15 -07:00
Max Semenik 031e6d37bf Drop old PHPUnit rudiments
Change-Id: I0a69ee7826227ee195415e43dc688f76602ed02b
2019-10-04 20:54:45 -07:00
Translation updater bot 1901505cc3 Localisation updates from https://translatewiki.net.
Change-Id: I89787320646c88e2ffb5f30cdc5ae4f61ddc1d7f
2019-10-04 09:29:03 +02:00
Volker E dce5173703 Remove IE 6 & 7 hacks
Bug: T234582
Change-Id: I5208a57ab3b1b95e97ca8a0d3d9c1df6c57ebc3b
2019-10-03 19:05:38 -07:00
Translation updater bot 259b0b936c Localisation updates from https://translatewiki.net.
Change-Id: Iaa8196c03cff776ed995983991b660072346e979
2019-10-02 09:21:01 +02:00
Translation updater bot 39c7cc6f7b Localisation updates from https://translatewiki.net.
Change-Id: Ic4b7055d78a2922fea3601112306261d8c65515b
2019-09-30 09:18:58 +02:00
Roan Kattouw 83f8949dc5 Stop exporting wgWikiId, use wgWikiID from core
Update usages of the variable for the capitalization difference.

Depends-On: I4d289267991f1f9a8e0710ec6ee5a2131306c510
Change-Id: Ie49e898b33765aa0723501be8c0c30622e7cbd2f
2019-09-25 18:14:40 +00:00
Translation updater bot d67cda9fdd Localisation updates from https://translatewiki.net.
Change-Id: I03b3301b4b5de5ed8c947a02a30f51a4724c567c
2019-09-25 09:23:11 +02:00
Translation updater bot c4b5994a91 Localisation updates from https://translatewiki.net.
Change-Id: If0a5128dcae2af1d2e73bee2f90dae76fe4c1cd6
2019-09-24 09:57:04 +02:00
Translation updater bot e94b40f88c Localisation updates from https://translatewiki.net.
Change-Id: Iea3c3bf88f677bb0158bfdd04586b569986b2baa
2019-09-23 09:25:21 +02:00
Translation updater bot 9efd56a0ac Localisation updates from https://translatewiki.net.
Change-Id: I5760c255259477dc34b0f0d8bc1ec568ffe59e19
2019-09-20 11:42:24 +02:00
Translation updater bot eaa719b629 Localisation updates from https://translatewiki.net.
Change-Id: I54df48b68d4e37f7d5a7a3edb9d26bf52a0fc300
2019-09-19 09:57:50 +02:00
Translation updater bot 00820d22bb Localisation updates from https://translatewiki.net.
Change-Id: Ide9755d9e3426b75edd4a716428a330ec13b4dc2
2019-09-17 09:07:26 +02:00
Translation updater bot 8030ef4f4b Localisation updates from https://translatewiki.net.
Change-Id: I7827b48ca229c899d8cf10e17e47aa56a2107e94
2019-09-16 09:55:02 +02:00
mainframe98 b942fa3c65 Inject PermissionManager into Userrightspage in tests
With I40fc8a709de96aceee14a10c973cd5b0a9a6f063 UserrightsPage
now requires the PermissionManager service to be injected.

Change-Id: Ibf3728c1e143787fb35b88ad8a8d5aabc8fadcb8
2019-09-13 18:24:52 +02:00
Translation updater bot 5595257b44 Localisation updates from https://translatewiki.net.
Change-Id: I4c4f216a61942e7461fc67842e047e2fca72678d
2019-09-13 10:17:54 +02:00
Translation updater bot da1a6097d2 Localisation updates from https://translatewiki.net.
Change-Id: I552fa0cbc9a75a19e25782c0242f3886f4a5c874
2019-09-12 10:00:37 +02:00
Translation updater bot 634515077c Localisation updates from https://translatewiki.net.
Change-Id: Ifbc3cb603b01f9b8a7edf45bd99aecfedeb3e690
2019-09-10 09:37:14 +02:00
Translation updater bot 0740de0605 Localisation updates from https://translatewiki.net.
Change-Id: Id01a5f6bb03641191590ff399c08785959477fdb
2019-09-09 09:26:07 +02:00
Translation updater bot 472612c741 Localisation updates from https://translatewiki.net.
Change-Id: I6337ce9767502b3ef4bc1a8ca243850c5185dd8f
2019-09-04 10:12:50 +02:00
Translation updater bot 396ad579ce Localisation updates from https://translatewiki.net.
Change-Id: I164d4dfd1396e51619c36759a86d8bc9ee79adc7
2019-09-03 10:27:26 +02:00
Translation updater bot ec0ad22ec3 Localisation updates from https://translatewiki.net.
Change-Id: I8a8c4b66b0d8cdf8c2ee1c7002a1b2b6af633ef4
2019-09-02 10:19:10 +02:00
Translation updater bot c63816675e Localisation updates from https://translatewiki.net.
Change-Id: I06821c2c4fe8c9f86f87136d6665ba91744af25c
2019-08-31 15:56:57 +02:00
Kosta Harlan 15d36ccae5 Remove global usage in UserNotificationGateway
As noted in Ic22075bb5e, UserNotificationGatewayTest relies on the presence of
globals. When Ic22075bb5e is merged, UserNotificationGatewayTest will fail in
CI. This patch injects the configuration object into UserNotificationGateway.

Change-Id: I9c15a588a76a41a3ebfb59dac7f0761f756008ff
2019-08-30 22:58:41 +02:00
Translation updater bot db352b6d86 Localisation updates from https://translatewiki.net.
Change-Id: I47c43ffd79dc53ff85cefd00cfa65b57eb1fa151
2019-08-30 10:03:07 +02:00
Translation updater bot 7342810175 Localisation updates from https://translatewiki.net.
Change-Id: I415b28c3beb70cbc2d0814c54384698d5bcdac02
2019-08-28 10:52:08 +02:00
jenkins-bot dc2ed9b79c Merge "Remove unused dependency on ext.echo.styles.notifications" 2019-08-27 17:01:54 +00:00
Translation updater bot ce752ec2a8 Localisation updates from https://translatewiki.net.
Change-Id: Ic7ca4e99ab5129e8b39f34e5dbab6c008abb4eb4
2019-08-27 11:03:42 +02:00
DannyS712 0b237983b8 Use Special:MyLanguage in API help links
Bug: T231269
Change-Id: I76e1e257616d8e2a43bcbe9efadead71a09bb058
2019-08-27 06:14:51 +00:00
Translation updater bot c003ca5ecb Localisation updates from https://translatewiki.net.
Change-Id: Ib01a046c971bc7c57af9ac8bc79c81962e33b9aa
2019-08-26 09:06:40 +02:00
Translation updater bot 44956a7c20 Localisation updates from https://translatewiki.net.
Change-Id: Ied0c872f0cdc6c221f9a1a75a6208979895e556e
2019-08-25 10:29:55 +02:00
libraryupgrader c5787d1726 build: Updating eslint-utils to 1.4.2
* https://npmjs.com/advisories/1118

Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: I6758fb164a0ce37ce1eb62d99675bdf90c0e8fa6
2019-08-24 07:31:33 +00:00
Translation updater bot 8ac4e625e6 Localisation updates from https://translatewiki.net.
Change-Id: Ia96371abfb90eb559382acab1826793edb86aed4
2019-08-23 09:48:12 +02:00
jenkins-bot 0da87cb6bb Merge "Localisation updates from https://translatewiki.net." 2019-08-21 08:15:24 +00:00