Commit graph

16 commits

Author SHA1 Message Date
jenkins-bot d53af8b8d3 Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
Thiemo Kreuz 8a7c3a78a9 Use "false" as type hint in PHPDoc tags
Most modern IDEs as well as documentation generators understand the
keywords "false" and "true", when a bool can only be one of the two.

Change-Id: I83dd1f0cc0802fa74ee35e7ca7425615230a767f
2018-08-13 15:31:13 +00:00
Thiemo Kreuz c1c3c7b672 Make "@… array" type hints more specific
There are about 200 of such generic "array" type hints in this code base,
the majority in @param tags. I started with what I found most relevant:
@var and @return tags. I might continue working on this later, but
wanted to stop for now to keep this patch moderately small.

Change-Id: Iff0d9590a794ae0f885466ef6bb336b0b42a6cd3
2018-08-13 09:27:37 +02:00
Roan Kattouw 544129492d UnreadWikis: Check the actual object we're about to call a method on
In principle, if $alertCount > 0, $alertTime should never be null,
but it feels much safer to check $alertTime itself instead.

Change-Id: Ifb107e257fbcd65e8181e2a214028f1b3733ac30
2018-05-30 05:03:51 +00:00
Aaron Schulz 06b6aee301 Add various read-only mode checks
* Make updateCount() check isReadOnly()
* Make EchoUserNotificationGateway::markRead() check isReadOnly()
* Make ApiEchoMarkRead check if the echo DB is read-only
* Remove access getExternalLB() argument

Bug: T187942
Change-Id: Ibafce8839b46e28251a6c1c08dd61fec4756bf33
2018-02-22 08:07:19 -08:00
Umherirrender 08cb7a470a Change doc type from DatabaseBase to IDatabase
Change-Id: I853b7cef85fdd77c28a947a8f3601f84ba17359a
2017-12-22 23:20:13 +01:00
libraryupgrader 7a23ddf4b0 build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: I7b19fab3b1100c4973600ec95ee24160e141c5ac
2017-09-24 09:49:43 +00:00
James D. Forrester 8c810dff48 build: Update mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I25cb61b3b92798f1259d1575a336e2b056d5764f
2016-12-05 15:54:30 -08:00
Matthew Flaschen ed626af0ad backfillUnreadWikis: Skip updateCount if race condition detected
Related doc fixes

Change-Id: I1b7545d2f86ec87e9701811ac5f4db0fec690681
2016-07-18 20:58:48 -04:00
Matthias Mullie 6be71f2fae Delete rows in echo_unread_wikis if there are no unread notifs
It used to be like this, but in order to get the messages badge to show
in the correct circumstances, I had to know if the user had ever had
foreign messages before & I also needed euw_messages_ts even if those
messages had already been read.

Now that we're unconditionally showing messages, we no longer need these
0-value rows.

Bug: T127731
Change-Id: I1fc13bf0e5133ae39224f66d1b5a59c769bfcee2
2016-02-23 16:21:28 +01:00
Stephane Bisson 7dc87b9f7a Allow setting the unread counts to 0 in the echo_unread_wikis
Bug: T127331
Change-Id: I90342c9d64277faa77a905b227148d3102d049cb
2016-02-18 15:31:55 -05:00
Matthias Mullie b9f2d026a6 If user only has foreign messages, the messages badge should not be suppressed
Bug: T124372
Change-Id: Id9699c56e9b8c6af77e74cbfc48b6e4e3464b3a5
2016-02-10 13:25:50 +01:00
Roan Kattouw 63eef35026 Cross-wiki notifications integration
Bug: T121829
Change-Id: Ifb52ad5605a56d27e5951479326689242a49430e
2016-01-13 09:47:57 -08:00
Kunal Mehta 999c53a1c3 Use CentralIdLookup instead of hardcoding for CentralAuth
Change-Id: I5b2d23588ab6b026d1a2100b9c16a74e9aefbd73
2015-12-08 16:54:23 -08:00
Roan Kattouw 23734e3539 Follow-up b85f978ddd: don't check for the non-existent CentralAuth class
Change-Id: Ie7ca022c659f9856641aaec6183eadf8a86865a2
2015-11-24 19:34:27 -08:00
Kunal Mehta b85f978ddd Track what wikis a user has unread notifications on
This implements a backend layer and database storage for tracking what
wikis a user has unread notifications on. It is not yet exposed via any
API.

Whenever the notification counts on the local wiki are reset, a deferred
update is queued to also update the central database table.

Change-Id: Id1498bdeb5811d6848dc66781ffca03e726eab90
2015-11-20 15:54:11 -08:00