Commit graph

631 commits

Author SHA1 Message Date
Matthew Flaschen 8f7499286d getCentralAuthToken back to protected.
This was for testing, I didn't mean to commit it.

Follow up 03262edf24

Change-Id: Ia5e8ec482d5b32891de67fe3da6e8c52cca099e9
2016-07-12 18:45:31 -04:00
Matthew Flaschen e578bb4ab4 CentralAuth: Bail if not fully initialized
Bug: T140144
Change-Id: I2bc242e98f864af50af5545424a4da318abc360f
2016-07-12 16:31:53 -04:00
Matthew Flaschen 03262edf24 Troubleshoot why Echo is still triggering CA failures
If we have a central ID, in theory it should not trigger
CA failures when getting a token.  However, it is, so maybe:

* This is the wrong way of checking attached-ness.
* It is somehow losing the central ID later.

or something else is going on.

Bug: T140144
Bug: T119736
Change-Id: I71c6f121a728e503aa9d62778e64c650cd8d46af
2016-07-12 15:07:01 -04:00
Roan Kattouw e63b8799a4 ForeignWikiRequest: Bail early for non-global users
Attempting to get a CentralAuth token for an unattached
user (or a user mid-attachment) throws an exception.

Bug: T119736
Change-Id: I2a34754f55b952f5bcd4da6c6f89a32ebc29ecf1
2016-07-12 09:05:30 +02:00
jenkins-bot 3eda03ac98 Merge "Special:Notifications JS even when no local notifications" 2016-07-08 18:19:49 +00:00
jenkins-bot 5dfdafcbb5 Merge "Fix E_NOTICE due to event_deleted missing on foreign psuedo-notification" 2016-07-08 13:28:42 +00:00
Matthew Flaschen 5c8eb10795 Fix E_NOTICE due to event_deleted missing on foreign psuedo-notification
Bug: T139536
Change-Id: Ie4536543bdc39abc55ecfc3224845ff6c97069ea
2016-07-08 01:51:11 +00:00
Moriel Schottlender 7879f0c9f8 Change 'messages' to 'notices' throughout the interface
Bug: T139520
Change-Id: Ib7f4dc4ea1ff4c5d1fccdc5fdf0c66b049162cb2
2016-07-07 15:57:49 -07:00
jenkins-bot 635f1471af Merge "Sort bundled notifications by read status AND timestamp" 2016-07-07 19:36:30 +00:00
Stephane Bisson ebd616d6f3 compact-header should be parse because it includes formatting
Bug: T139602
Change-Id: I3c9fd6cd6b5b805b7867de6ee2cb3555a5d0d123
2016-07-07 13:16:26 -04:00
jenkins-bot 1bc15bb805 Merge "Notification count: don't assume 'all'" 2016-07-06 22:20:44 +00:00
Stephane Bisson 194b9c78a4 Notification count: don't assume 'all'
Bug: T139323
Change-Id: I44ebdc600015bdfadc07e313689b8fad1d1c60c0
2016-07-06 21:04:49 +00:00
Stephane Bisson db838e42ce Keep bundled notification compact header on one line
Bug: T139321
Change-Id: I4b0a7173bc06a0760efff544bcc28a59ba72ce7f
2016-07-06 20:44:00 +00:00
Stephane Bisson b215a5d7c0 Sort bundled notifications by read status AND timestamp
Change-Id: I21b00622828c5c518cf83e78457134a66ac71947
Bug: T139521
2016-07-06 16:02:04 -04:00
Stephane Bisson 90bc75912c Special:Notifications JS even when no local notifications
Launch JS version of Special:Notifications even of the
user doesn't have any local notifications.

Bug: T139512
Change-Id: Ia01a57de307b0d7da6a7d81ec8ee32d02ccc1887
2016-07-06 15:24:46 -04:00
Roan Kattouw f62106f740 ApiEchoNotifications: Don't add wikis with no timestamp
This should prevent fatals in the sort-by-timestamp code
farther down, and also prevent incorrect output.

Bug: T139112
Change-Id: I6480b2e751594ba3392322f40e950f95ae702104
2016-07-01 21:17:29 +02:00
jenkins-bot 71bfae12c3 Merge "Change wfWikiId (lowercase d) to wfWikiID (uppercase D)" 2016-06-29 13:29:44 +00:00
Matthias Mullie 620d50f23f Change wfWikiId (lowercase d) to wfWikiID (uppercase D)
PHP can handle incorrect capitalization, but we should use the correct function
name.

Change-Id: I6db9bb90a8573f65cde503b771c9539faf38e75e
2016-06-29 15:11:21 +02:00
Stephane Bisson 5ffbc4db97 Fix foreign bundle count
Use foreign source reported notifications count
instead of counting the actual objects.

Counting objects is wrong because of bundles
that are 1 object but represent multiple notifications.

Bug: T138888
Change-Id: Ib63efc1e33af8f4364a7ba11a0dc3ff820f0a03c
2016-06-29 09:09:55 -04:00
Stephane Bisson f8a8d392d6 Expandable bundle
Support bundles being expandable
to show their sub-notifications.

Bug: T114356
Change-Id: I1507cae360f45cc87f2d60e966b4d047abfa202d
2016-06-28 15:37:54 -04:00
jenkins-bot 731cde01b8 Merge "Dynamic bundles" 2016-06-28 19:34:42 +00:00
jenkins-bot 8ca3bbac5e Merge "Mention notification: don't repeat the section title at the begining of the excerpt" 2016-06-28 19:13:00 +00:00
Stephane Bisson 23691d73d1 Mention notification: don't repeat the section title at the begining of the excerpt
Bug: T134922
Change-Id: I731ed9a7fafa7964aca776c543a58f6c5692f89a
2016-06-28 09:48:38 -04:00
Stephane Bisson cf7bee76ee Don't send empty emails
If no notification can be rendered,
don't send an email at all.

Bug: T137012
Change-Id: I57944e7af275ddecdffc82de8c050d8baa357660
2016-06-28 09:19:01 -04:00
Stephane Bisson 24caf50ff6 Dynamic bundles
To allow individual notifications to be
marked as read/unread or moderated,
bundles are created by grouping associated
notifications when they are fetched for display
instead of when they are created.

From a product perspective, this change doesn't
introduce moderation or expandable bundles but
it counts each individual notifications.
For instance, the bundled notification
"3 new topics on PageA" now counts as 3
notifications.

Bug: T93673
Bug: T120153
Change-Id: Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
2016-06-27 09:49:13 -04:00
jenkins-bot 79aad8f479 Merge "Add support for querying notifications not associated with any page" 2016-06-27 13:35:02 +00:00
Roan Kattouw 7d97881344 Add support for querying notifications not associated with any page
Uses the magic value '[]' to mean 'no title'. This is a bit ugly,
but I think introducing an additional &notwithouttitle=1 parameter
is uglier and results in more code.

Change-Id: I83278182aeaf3905eb0f3e24c4c6c247720b1e76
2016-06-24 00:37:21 +02:00
jenkins-bot 2eabf079f8 Merge "Clean up and fix updateEchoSchemaForSuppression.php" 2016-06-23 20:38:04 +00:00
jenkins-bot c90176a2cb Merge "ApiUnreadNotificationPages: Output pages as an array rather than an object" 2016-06-23 19:35:37 +00:00
Roan Kattouw 6c4bf99da8 ApiUnreadNotificationPages: Output pages as an array rather than an object
Make the frontend code based on page titles rather than page IDs.

Change-Id: I79c6a0e3a7178acdb14039a0c5208e90a7341044
2016-06-23 17:00:51 +02:00
jenkins-bot 190994bab2 Merge "Use the actual total notification count in the special page sidebar" 2016-06-23 11:05:14 +00:00
Moriel Schottlender bbf2ba7e7b Change link to help page on Special:Notifications
Bug: T138395
Change-Id: I6b9476206c53925a9d63b41da4b2fde33c739584
2016-06-22 12:38:38 -07:00
Stephane Bisson c93800e17c Support for PlaceholderWidget with no link
Bug: T137490
Change-Id: Ia861b5aa3f100124418956a0e09603a9ba29215a
2016-06-22 12:54:13 -04:00
Roan Kattouw e4b79c1bc2 Use the actual total notification count in the special page sidebar
Adding up numbers in the front-end is not enough, because it could
be that not all pages are listed (it's a top 10). So get the
total count from the backend.

Change-Id: Ibbc76691ef88333b92132a514fdba3cde3797e10
2016-06-22 17:11:34 +01:00
addshore c1b4e4d5aa docs: Fix typo of 'begining' instead of 'beginning' in phpdoc
Change-Id: Ibc015f2133393788634d7e8b6119dcc305c6c534
2016-06-22 13:02:13 +00:00
Stephane Bisson b3273d23d7 Define global transition vars before using them
Bug: T132954
Change-Id: I9515f79285672aff10545502ba1558dc2443eaff
2016-06-21 08:00:27 -04:00
jenkins-bot 6b20e63b73 Merge "Clarify mention error log comment" 2016-06-20 16:14:54 +00:00
WMDE-Fisch 3e9b2055b2 Clarify mention error log comment
The case also logs non-existing users.

Change-Id: Id5a360b672df11d214459432c4ebbed5c03c1ba9
2016-06-20 18:01:51 +02:00
jenkins-bot 6d12122f9f Merge "Gracefully handle outdated echo_unread_wikis rows" 2016-06-20 15:51:18 +00:00
Roan Kattouw 792de35994 Gracefully handle outdated echo_unread_wikis rows
Adds $wgEchoSectionTransition and $wgEchoBundleTransition.
If either of these settings is enabled, we will disbelieve
the alert/message counts in the euw table and obtain them
using server-side cross-wiki API queries instead.

This affects both ApiEchoNotifications (for generating the cross-wiki
summary entry) and the count and timestamp computation in NotifUser.

In bundle transition mode, we trust that notifications are classified
correctly between alerts and messages, but we don't trust the
counts in the table. In section transition mode, we trust that
the sum of the alert and message counts is the correct count,
but we don't trust the alert and message counts individually.
If both modes are enabled, we mistrust anything that's mistrusted
by either mode and only trust what's trusted by both modes.
In any event, we do trust that only the wikis with rows in the
euw table have unread notifications.

Bug: T132954
Change-Id: Ibcc8ac102dac3cf06916d67427b42457fdb93db6
2016-06-20 16:21:03 +01:00
matejsuchanek 282ec08110 Add missing parameter to a message
This is already done in EditUserTalk-, Mention- and RevertedPresentationModel,
so PageLinked- should be consistent.

Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
2016-06-20 17:14:45 +02:00
jenkins-bot 15dc477e04 Merge "Try to extract an excerpt from a revision" 2016-06-19 10:02:39 +00:00
Stephane Bisson d55396dee8 Try to extract an excerpt from a revision
Bug: T120152
Change-Id: I91abb2dded9ab7f124aaa798dd07c52576ee791b
2016-06-17 11:26:00 -04:00
Roan Kattouw 87e515e02b NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys
Change-Id: Id9a39a481533d39f99c9d7f43c573af81fe957cf
2016-06-17 15:49:31 +01:00
Catrope 2771b94af7 Revert "Implement backfillUnreadWikis.php in terms of resetNotificationCount()"
Better idea: invalidate caches in this script, and write
a separate script to recompute existing euw rows.

This reverts commit c83af257d2.

Change-Id: I57bccfb726eada646cb318206d9091a20d59dcf5
2016-06-17 13:43:29 +00:00
jenkins-bot 7a6d0f6aa3 Merge "ApiEchoNotificatons: Add nottitles parameter" 2016-06-16 12:09:46 +00:00
Roan Kattouw bbac9ff0c4 Follow-up 05e531c7b6: actually unset notcrosswikisummary
To prevent recursive cross-wiki notifications from appearing.

Change-Id: I63808e32561a350bf8b3286ebc9ec180958059c7
2016-06-15 23:48:54 +01:00
jenkins-bot e6c78fa09a Merge "Allow the primary link to set all bundled notifications as read" 2016-06-14 15:42:35 +00:00
Stephane Bisson b06b2294c9 Allow the primary link to set all bundled notifications as read
Bug: T136368
Change-Id: If07369cb168d1a085f297293e713d65e49997264
2016-06-14 08:49:23 -04:00
Roan Kattouw bcbb1763be PageLinkedPresentationModel: Use the correct title for the diff link
Also cache the from title, because Title::newFromId() doesn't cache
its results.

Bug: T137798
Change-Id: I5df444d3dacd55fbee09e53d82ac22c77ee9e246
2016-06-14 12:30:03 +01:00