Commit graph

775 commits

Author SHA1 Message Date
Sébastien Santoro ad0cf6cda0 Fix MentionStatusPresentationModel::getSecondaryLinks return value
Any class implementing EchoEventPresentationModel and overriding the
getSecondaryLinks method should return an array (while getPrimaryLink
could return a false boolean value).

This change fixes the following errors:

Warning: array_values() expects parameter 1 to be an array or collection
in …/extensions/Echo/includes/formatters/EventPresentationModel.php on line 494

Warning: array_filter() expects parameter 1 to be an array or collection
in …/extensions/Echo/includes/formatters/EventPresentationModel.php on line 494

This is a follow-up for commit b4b59ee4.

Bug: T145229
Change-Id: Ic66ca03b6979472495c9b748093d01f8f097d56a
2016-09-09 19:59:09 +00:00
Stephane Bisson b3c07eedeb Remove etp_user
Target page entries used to exist for each user
that was notified for an event. They were
removed as the notifications were marked as read.

Now they remain so that the association between
pages and events can be used for moderation
regardless of the notifications read status.

This patch removes everything about
echo_target_page.etp_user from sql and php code.

Bug: T143959
Change-Id: Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
2016-09-09 09:32:28 -04:00
Moriel Schottlender 59c0ad6c4d Make 'Edit threshhold' notif appear regardless of title existence
If a user recieves 'this is your X edit' they should get this notif
regardless of whether the edit they created was deleted. We should
make sure the title is there only for deciding whether or not to
create a link for it; otherwise, the notification will just appear
without a link to the revision.

Change-Id: I00ed4278bb4e15b1e9ddfa2c3af8fad0540fc5f8
2016-09-08 23:01:47 +00:00
Roan Kattouw 48ca4aeb5e ModerationController: Update count from master, not slave
At the time that resetNotificationCount() is called, we've only
just moderated something, so the slave won't have those changes yet,
and the computed notification count will be wrong.

Change-Id: Ia83f2b9cf7f4bbaee25e03f7bc8f73bcd4d345f9
2016-09-08 15:26:07 -07:00
Moriel Schottlender 00e0b9f45d Make seen/unseen badge more consistent across wikis
- Add a 'hasUnseen' data to the xwiki bundle so the badge can
  consider its value when changing its color even without the
  bundle being opened.
- Check and store seenTimes from all sources that the xwiki
  has in a new JS object that the SeenTimeModel can store

Bug: T134855
Change-Id: Ifdcee88b4378cdc7acb4ae5c0cbc60b76339757e
2016-09-08 12:40:15 -07:00
Chad Horohoe da4f8f5db9 Use static cache for times so it works across instances of SeenTime
Follows-up If6319a02. Making the cache static enables us to reuse
the in-process cache across multiple instances of the class.

Bug: T144534
Change-Id: I1a594830f13d56ab4e0e636a3cdb5e96379e990a
2016-09-08 12:24:46 -07:00
WMDE-Fisch 4ac1711be8 Send mentions when editing multiple sections in between sections.
This patch fixes mentions not being send when multiple sections were added
in between sections.

Since we only want to send mentions when userlinks and signature are present
in the same section a new method was added extracting sections and the related
content from an addition. The results are checked whether a section content
contains a signature and might be relevant for mentions.

Bug: T141863
Change-Id: I434c664552bbadbeef6e897e20703e813f5a4c52
2016-09-08 15:15:14 +02:00
Moriel Schottlender eb98b21dfe Add 'canRender' check to EchoMentionStatusPresentationModel
Change-Id: Ica338ff5810b62849d30e5b27709558f1b797c43
2016-09-06 14:44:51 -07:00
Kunal Mehta b3cdd56952 SeenTime: Wrap cache with CachedBagOStuff
That adds an in-process cache so we don't have duplicate key lookups on
every request.

Bug: T144534
Change-Id: If6319a026c457a32bfde0e212c6193aa728cb208
2016-09-06 13:06:26 -07:00
jenkins-bot cf7cf0dd66 Merge "Provide title when parsing wikitext" 2016-09-02 01:48:33 +00:00
Stephane Bisson c75d974004 Provide title when parsing wikitext
Bug: T141460
Change-Id: I802c9c4bf964a060e44f25a487b5aec6f7d8c6b6
2016-09-01 16:48:56 -04:00
Moriel Schottlender 97a7d44190 Clean up Special:Notifications output
Transform the php output to OOUI widgets.

Bug: T129172
Change-Id: I65cb5f2a016fc2a3c33a0b1cd2f3f88ed963ab02
2016-09-01 13:38:06 -07:00
Moriel Schottlender a0e02da71f Style changes for unwatch actions
- Reverse 'watch' / 'unwatch' star icons
- Truncate title texts
- Minor indentation fix

Bug: T132975
Change-Id: I1dbd6d1480f6ef5a45184271c932cd27258f7424
2016-08-26 14:58:10 -07:00
jenkins-bot 23e95ec3fe Merge "Dynamic actions: Reuse label/description for those fields" 2016-08-26 18:12:54 +00:00
Stephane Bisson 405b8ce084 Loading notifications starting with one big local bundle
Redo of cc86387f80 but
trying not to break the special page this time.

Bug: T143813
Change-Id: Id39d18a2ba4efa2b49ed42d10aa9aeef0e4672f0
2016-08-26 06:45:48 -04:00
Matthew Flaschen 299b66f937 Dynamic actions: Reuse label/description for those fields
This is necessary to preserve backwards compatibility for the API, and
this also fixes the no-JS special page.

Also, fix additional warnings.

Change-Id: Id603b4ab22c69097d5559a756bec72a6ba785661
2016-08-25 22:00:25 -04:00
jenkins-bot c82e390591 Merge "Remove unused method EchoEventMapper::fetchByUserBundleHash" 2016-08-26 00:17:59 +00:00
jenkins-bot 6249814324 Merge "Revert "Get the overfetched before bundling to avoid removing the base"" 2016-08-25 22:46:31 +00:00
Catrope 7c400c927e Revert "Get the overfetched before bundling to avoid removing the base"
Breaks pagination. At least on Elena's machine, this results
in only 51 results being shown with no pagination controls.

This reverts commit cc86387f80.

Change-Id: I6f888581039dc9171ce2114c47e53c2eda4eb8a3
2016-08-25 22:39:43 +00:00
jenkins-bot 276a38e8ad Merge "Get the overfetched before bundling to avoid removing the base" 2016-08-24 18:55:44 +00:00
Stephane Bisson cc86387f80 Get the overfetched before bundling to avoid removing the base
Bug: T143813
Change-Id: I82809d5fe1dd919810349d820a5f62175ce48fd4
2016-08-24 14:38:21 -04:00
Stephane Bisson 9dd4e4ee30 Don't select echo_event.*
Removed fetchByTypesAndPage since it is now unused

Fixed fetchByPage to select simple * instead of
echo_event.*

Bug: T105890
Change-Id: I486f27501a649d5368305965d2cd012afe0915b2
2016-08-24 12:56:49 -04:00
Roan Kattouw ce3d6b2f49 Remove unused method EchoEventMapper::fetchByUserBundleHash
Bug: T143763
Change-Id: Iad63e8866eeccf316b3efe3a44888256c0c407d8
2016-08-23 19:22:01 -07:00
jenkins-bot 4e99a5095f Merge "Add dynamic secondary actions to notification items" 2016-08-23 17:43:08 +00:00
Roan Kattouw ff2c58cdc4 Follow-up 8eda2aa3f: actually render the nojs message on Special:Notifications
Change-Id: Id0d931f8465c2abfa41b1053ec2b2d0a632037ed
2016-08-22 16:16:41 -07:00
Moriel Schottlender 480ce92bd8 Add dynamic secondary actions to notification items
Allow extensions to add dynamic actions that perform some
API request and display a confirmation message.

Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
2016-08-22 16:04:48 -07:00
Matthew Flaschen f36d20ba4d Fix special page visit logging
'version' was missing, making the event invalid, causing it to
not reach the database.

Factor out this field to logEvent

Bug: T121939
Change-Id: I9e4bb5574d69495cb5f53830047c68104c6ad10f
2016-08-22 16:35:50 -04:00
jenkins-bot 18a3da6b28 Merge "DiscussionParser stripSig from mention content" 2016-08-19 22:47:53 +00:00
jenkins-bot 95f829a3b7 Merge "Moderate notifications" 2016-08-19 22:34:16 +00:00
Stephane Bisson 6e2236db81 Moderate notifications
* When a page is deleted, moderate associated
  notifications. When it is undeleted, unmoderate.

* When a notification cannot be rendered
  (canRender() returns false), moderate it.

The biggest advantage of moderation over mark-read-and-ignore
is that those notifications are filtered out at the database
level from this point on. They are not re-processed every single
time and do not affect the number of notifications returned by
the API.

Bug: T140327
Bug: T140836
Bug: T141463
Change-Id: Idefe78408fd584c13aaa9174cee3055539d92848
2016-08-19 22:20:04 +00:00
Jakob Warkotsch 1afd529a67 Log potential notification for mentions on changes
This logs whenever a user gets mentioned in a change as
long as a signature is added in the same edit.

Bug: T138938
Change-Id: I2a775d1dcac6a947b353c8bd2f7be70b6384641f
2016-08-19 22:05:16 +00:00
jenkins-bot f48b44bacd Merge "Log edits in multiple sections that could trigger mentions." 2016-08-19 22:00:43 +00:00
Matthew Flaschen 2186e9a6b6 Make server-side logging always check whether schema is enabled
We have a convention to put a logger helper function in
MWEchoEventLogging, so also enforce that:
* Rename to actuallyLogTheEvent to logEvent and centralize the
  'enabled' check there.
* Make that protected, so new schemas also use a helper function
  for consistency.

Bug: T143092
Change-Id: I8085fc5898f3420172355c5a2df04aac6add9acd
2016-08-18 21:09:48 -04:00
WMDE-Fisch 66ecc1f0e7 Log edits in multiple sections that could trigger mentions.
This patch logs multiple section edits that could trigger mentions.

Since we only want to send mentions when userlinks and signature are present
in the same section a new method was added extracting sections and the related
content from an addition. The results are checked whether a section content
contains a signature and might be relevant for mentions.

Bug: T141863
Change-Id: Ib06cd855b2c7fbd51d8ab6602882cb38aadf8350
2016-08-18 14:58:00 +02:00
Moriel Schottlender 8eda2aa3fa Include the 'no notifications' message in nojs div
...So it can be hidden if JS is loading.

Bug: T142451
Change-Id: Idd70bdacb79cb45e759b30e711178721db5f80bd
2016-08-16 17:25:14 -07:00
jenkins-bot 435fe70fe0 Merge "Add a rasterized email icons to Echo modules for email" 2016-08-16 23:27:04 +00:00
Leszek Manicki 975be8fb45 Flip the parameter name and its type in phpdoc of MWEchoEventLogging
Also adds a type hint to MWEchoEventLogging::actuallyLogTheEvent
parameter.

Change-Id: I7538083ec33b5c4538386da22550273d8e882a72
2016-08-16 15:01:57 +02:00
Leszek Manicki ab2bf21ce5 Check if logging is enabled before logging EchoInteraction
Adds a check before logging a visit to Special:Notifications
added in Icfe63fb8daa8e8fba029e22b4de3e4f65517c448

Bug: T143092
Change-Id: I9e58ba35eef6a25a78e96a76facc04819cef37da
2016-08-16 14:39:02 +02:00
jenkins-bot dc397a9ec4 Merge "Log Special:Notifications page visits" 2016-08-16 00:23:31 +00:00
Moriel Schottlender 5fefbe4b03 Add a rasterized email icons to Echo modules for email
Make sure we send rasterized png emails instead of SVGs in the
email formatter.

Bug: T127794
Change-Id: Ia28757bda521ec182f75458c8e52d54847d15681
2016-08-16 00:21:13 +00:00
Moriel Schottlender 015acb5407 Log Special:Notifications page visits
Bug: T121939
Change-Id: Icfe63fb8daa8e8fba029e22b4de3e4f65517c448
2016-08-15 17:10:56 -07:00
Roan Kattouw 8016c9628b Follow-up 4e64643eb: Count pageless notifications when counting pageless notifications
Bug: T137502
Change-Id: I9e861cf97d0d8850dcbe732da496e34d434e4554
2016-08-15 11:35:28 -07:00
WMDE-Fisch c81e1b93d2 Fix mention failures not beeing sent.
While manual rebasing the bundle patch the wrong
line was removed.

Also improves tests to check for notifyAgent.

See I1069aeb5523db8710da4e8e21065bf447d031e3c

Change-Id: I33ddeccea153d6f6ae97e5c60e8b47dc24fb4833
2016-08-15 14:25:22 +02:00
WMDE-Fisch 272cb9a960 Bundle mention success and failure notifications
Adds common bundling including messages and icons.
Bundling relates to revision now.
Changed order how notifications are generated. Now errors will
show first, since they are generated last.

Bug: T140224
Change-Id: I1069aeb5523db8710da4e8e21065bf447d031e3c
2016-08-13 08:08:12 +00:00
addshore b5f0c435ec DiscussionParser stripSig from mention content
This will allow us to:
 1) Fix a bug involving showing the sig in the snippets
    of mentions (Something catrope mentioned to me but
    I do not know of a bug number for it)
 2) Send more accurate sameUser failure metrics to
    graphite as signature links would never be counted
    as a mention

Change-Id: I33677012673ae6e4665aaaf59d4f350602f7276a
2016-08-12 19:43:03 +00:00
jenkins-bot cf3e03edc9 Merge "Revert "Allow self mentions"" 2016-08-12 01:48:03 +00:00
Mattflaschen 59568789fa Revert "Allow self mentions"
This reverts commit 0e23463185.

Change-Id: I4389c7b93b2bbc117931a263b58a8f1cc30dca6c
2016-08-12 01:41:08 +00:00
Stephane Bisson a0cca6c127 Output wgNotificationsSpecialPageLinks js var even if no local notifications
Bug: T142148
Change-Id: Id9225b9aa95a7a8ee8602282ed0d4619c7ce2bf5
2016-08-05 09:26:35 -04:00
jenkins-bot 189d84d01d Merge "Allow self mentions" 2016-08-04 22:53:54 +00:00
jenkins-bot 03f6fb8bcb Merge "Rename ApiEchoUnreadNotificationPages->getFromForeign" 2016-08-03 19:06:46 +00:00
Matthew Flaschen 99f1e78b52 Rename ApiEchoUnreadNotificationPages->getFromForeign
This was causing a strict standards warning due to inconsistent
parameters.

Rename it to getUnreadNotificationPagesFromForeign .  Since
this does a data transformation (it doesn't have the same response
structure as the parent), I decided to rename it rather than
make the parameters match.

Change-Id: I259def82b933cbde0e94a49f9a9d6f754f681808
2016-08-03 14:50:22 -04:00
jenkins-bot e07acb5586 Merge "Remove secondary link in bundled messages for mention status notifications" 2016-08-03 18:32:49 +00:00
WMDE-Fisch b4b59ee485 Remove secondary link in bundled messages for mention status notifications
Change-Id: I76de1626c77831b09fe3bb410d17ce354783076a
2016-08-03 18:22:04 +00:00
addshore 1880c683c2 Fix phpdoc in DiscussionParser::extractHeader
Change-Id: Ic92cea8fdcd0ccb6290204572b952d494554de3f
2016-08-03 13:31:09 +01:00
addshore 0e23463185 Allow self mentions
Bug: T138080
Change-Id: I8832f71559741787084bc06e1f7c5ea0f7918d82
2016-08-03 12:38:34 +01:00
Roan Kattouw 4e64643eb7 Implement subject+talk and null+user page grouping
Make it optional through the unpgrouppages parameter, so that
generic usage of the unreadnotificationpages API is still possible.

In the front-end, store which display title maps to what set of titles,
and pass in the full set rather than just the display title when
filtering by a page.

Bug: T137502
Change-Id: I443ca00ff5e5d36fd6910101226358942e6aa8ee
2016-08-02 13:48:48 -07:00
Moriel Schottlender 879fe27bc6 When fetching combined seenTime, get 'min' value rather than max
This will make the mobile view show unseen state if any of the
badges have unseen state rather than not show it if one of the
badges was more recently seen than the other in desktop.

Bug: T141404
Change-Id: I27109ee6a24831d58767f9bd13ed58e54094aee1
2016-08-01 19:14:51 +00:00
WMDE-Fisch 78632108fd Echo notifications for successful mentions
Adds new notification type and icon for successful mentions.
Complements existing test to consider successful mentions.

Bug: T139623
Change-Id: I7a77b40e8b14c95cadb9023065ee916247feacf9
2016-08-01 13:40:55 +02:00
jenkins-bot ddbe065b7d Merge "Refactored generation of mention events." 2016-07-29 14:59:11 +00:00
WMDE-Fisch 86d3352464 Refactored generation of mention events.
To increase reusability in future changes.

Change-Id: Ia56f4c587361f0214d738cdf690cf9abf93a2021
2016-07-29 14:49:09 +02:00
Matthew Flaschen 954e076fd1 SeenTime: For 'all', use MW, then convert after taking max.
Lesser-used formats like TS_ORACLE are not string-comparable.

Change-Id: I7a9fd3ac0c8b1e924f6f0e8970f7a005858df9d7
2016-07-28 20:11:30 -04:00
Moriel Schottlender b623bdc6d3 Forward format to seenTime when getting 'all' types
Change-Id: Id79c4403ea879bb08b0ce94d24f7bdbb8ea83560
2016-07-28 15:09:16 -07:00
Matthew Flaschen f845f6cc7b BREAKING CHANGE: Use ISO 8601 for 'ts' in cross-wiki summary.
Bug: T141164
Change-Id: Id0f029dd2fec0197bc01a1103fb569d086dec724
2016-07-27 17:00:05 -04:00
WMDE-Fisch 4c7e5d2669 Rename mention-too-many failure notification.
Change-Id: I49041bd01697ae4c160766f194c92ff3d7a4a989
2016-07-27 16:41:29 +00:00
jenkins-bot 0815c41560 Merge "Echo notifications for mention failures" 2016-07-27 11:27:55 +00:00
WMDE-Fisch 868190bbf6 Echo notifications for mention failures
- Adds global "$wgEchoMentionStatusNotifications"
   to activate mention status notifications.
   (must be set before extension is loaded)
 - Adds notification types and icon for some basic mention
   failures.
 - Adds failure and stats for anonymous IP.
 - Adds check for links to user subpages.
 - Adds config var for max mention notifications allowed.
 - Bundles notifications.
 - Refactors test for the event generation and adds tests
   for unknown users, user links with subpages and failures
   for too many mentions.

Bug: T136326
Change-Id: I388bdc3714feb9a2865a5ad10dbeabb0a6a09a4f
2016-07-27 13:00:25 +02:00
Matthew Flaschen c0a464e425 BREAKING CHANGE: More ISO 8601 for seen time
* Add ISO 8601 date format to notification output

  This is actually supposed to be the only output date format used,
  per https://www.mediawiki.org/wiki/API:Data_formats#Timestamps , but
  I'm not doing anything to deprecate the others right now.

* Change wgEchoSeenTime to use ISO 8601.  mwgrep and extension grep do
  not show any usages.  However, since it is a breaking change, to
  minimize disruption, I'm also using this opportunity to change
  'message' to 'notice'.

* Remove wgEchoInitialNotifCount.  I was going to also change 'message'
  to 'notice' here too, but then I saw it was totally unused.
  (It was read in Echo to populate a JS variable, but then it was
  unused.)

* Make sure the Special:Notifications page aggregation by days is
  done by local days, even though the timestamp per item is still
  UTC. This is to make sure the days are displayed correctly in
  the local timezone.

* Change all reverse sorting callbacks to handle comparisons of
  ISO 8601.

Bug: T141413
Change-Id: I20271345c7d350dc3e7f467288e5cdc98e6250cc
2016-07-27 02:42:08 +00:00
Stephane Bisson a970c44845 Process bundled notifications when the base is filtered out
When the base of a bundle cannot be rendered
(canRender() returns false), the bundled items still
have to be rendered and potentially marked-as-read as well.

If we don't do this, the base is filtered out, marked as read,
the counter goes down by 1 and the bundled notifications are ignored.
On the next query a new base is selected, filtered out, etc.
So if a bundle of 10 notifications cannot be rendered because it's
10 new topics on a deleted flow board, the flyout has to be opened
10 times for the counter to finally be 0.

Change-Id: I06962b25e36802ef00278e2bc70d5377b5874695
2016-07-26 15:07:23 -04:00
jenkins-bot d384b792d7 Merge "Paginate even if some events are filtered out" 2016-07-25 20:43:24 +00:00
jenkins-bot 834c240948 Merge "Adjust mobile view for the new settings cog menu" 2016-07-25 20:12:38 +00:00
Stephane Bisson da0e0e37e0 Paginate even if some events are filtered out
When requesting notifications, the 'continue' value used
for pagination is only included if there is more
notifications than requested. When some are filtered out,
there is less notifications and no 'continue' value,
which leads to no pagination at all on the special page.

Change-Id: I1a13d2a343f4e60489e2a6a0474c97664ed00d46
2016-07-25 15:54:16 -04:00
Moriel Schottlender 1dd3af10bb Adjust mobile view for the new settings cog menu
Now that we have the cog menu, it should be placed correctly in
mobile and the "preferences" link should be hidden.

Since MobileFrontend doesn't have the personal toolbar, and we
can't cheat by using jQuery and grabbing the url of preferences,
we have to get SpecialNotifications.php to output the urls
to a wg variable and reading it from there.

Bug: T115528
Change-Id: I6a69823d6f75c376c04e9a21d79916321e417178
2016-07-25 19:30:44 +00:00
Stephane Bisson bfcfdded40 Special:Notifications (no-js): filter out deleted events
Change-Id: Ie2e6b3ba388650f28ddc050624a52c410248fbd8
2016-07-25 12:21:14 -04:00
Aaron Schulz 9d436067a7 Convert deferred update to using AtomicSectionUpdate
Change-Id: Ic30a940d243986e71cfc8e66a70c0c2e77438506
2016-07-21 23:43:21 -07:00
jenkins-bot f79b4ebca5 Merge "Documentation for EventPresentationModel" 2016-07-21 17:35:26 +00:00
Stephane Bisson a77d75c3ee Documentation for EventPresentationModel
Change-Id: Ia620bd1a2a562c606752195cb459dc46d41db7b2
2016-07-21 12:25:46 -04:00
Stephane Bisson a4e7bee5ef Exclude deleted events from UnreadNotificationPages API
Change-Id: I1eb1be1de1af884715e8a3b85f18770e6f0d6ff2
2016-07-21 14:10:40 +00:00
jenkins-bot bf502f89a0 Merge "Allow requesting TS_ISO_8601 for ApiEchoMarkSeen, and deprecate TS_MW" 2016-07-21 02:04:06 +00:00
Matthew Flaschen 756948d489 Allow requesting TS_ISO_8601 for ApiEchoMarkSeen, and deprecate TS_MW
(Previously TS_MW was the only possibility).

Per https://www.mediawiki.org/wiki/API:Data_formats#Timestamps

Bug: T139993
Change-Id: Ief9a720a5053ee153b84edb64524aa4743cc76f1
2016-07-20 18:22:28 -04:00
jenkins-bot 3fd553a152 Merge "Add seen time to output of API, in ISO 8601 format" 2016-07-20 16:31:54 +00:00
Matthew Flaschen c05133283a Add seen time to output of API, in ISO 8601 format
Like count, it is available both grouped by section and ungrouped
(top-level).

Unlike count, the top-level still has both sections (but with the
string 'seenTime' at the root), and if groupbysection is used,
it will not also have top-level (since it would be redundant).

Example output at T139993

It will be false or omitted if there is no seen time, depending
on JSON format version (2+ is false).

Bug: T139993
Change-Id: I9f4f9df69203204b56002afa1be6ed2336c33898
2016-07-20 09:25:03 -07:00
Stephane Bisson cf71009638 Remove deprecated formatter
Followup to I639b9d9906d3ff37021cb9b5ed3cb401354b5bd9

* Remove deprecated formatter
* Log a warning and fail gracefully
  when an event type does not support
  Echo presentation model.

Bug: T121612
Change-Id: Ic5712c4ce265b6faabce7a4028b4294fe3c73f18
2016-07-20 11:00:34 -04:00
jenkins-bot 059bcbe95f Merge "Cleanup old notification formatting system" 2016-07-19 22:19:57 +00:00
jenkins-bot 414a1a189d Merge "Optimize DiscussionParser.php" 2016-07-19 22:10:35 +00:00
jenkins-bot 3d258c7929 Merge "Use StatsdDataFactory service instead of deprecated RequestContext method" 2016-07-19 21:21:52 +00:00
jenkins-bot 76e6d545fb Merge "Check for empty array before calling max()" 2016-07-19 20:33:04 +00:00
Matthew Flaschen c1365be90d Fix typo (canUseCentralAuthl -> canUseCentralAuth)
Change-Id: Ic27240df0744c6025e7b1922d31250377f0a2bc4
2016-07-19 10:16:57 -07:00
jenkins-bot c17c6625a6 Merge "backfillUnreadWikis: Skip updateCount if race condition detected" 2016-07-19 01:18:53 +00: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
Roan Kattouw 83a181ce9c ForeignWikiRequest: Also check User::isSafeToLoad()
Check it for both $wgUser and $this->user because they
could theoretically be different.

Bug: T139665
Change-Id: I59cb4f0122a9fccb32ca165fda065dee2467b1da
2016-07-18 14:49:43 -07:00
Leszek Manicki 6dcb872a7b Use StatsdDataFactory service instead of deprecated RequestContext method
Change-Id: Ie291146f67b525d891614c23b17052500fc8aa51
2016-07-15 18:03:47 +02:00
matejsuchanek d53e2cc75f Optimize DiscussionParser.php
Change-Id: I57c422d4c276062d4d55c9a8f580a22ef318f732
2016-07-13 17:31:06 +02:00
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
Stephane Bisson 2f0ff9cbf6 Cleanup old notification formatting system
* Deprecated main entry-points
* Removed unused configuration
* Removed old formatters for Echo events (mention, edit-user-talk, etc)
* Removed unused messages

Bug: T121612
Change-Id: I639b9d9906d3ff37021cb9b5ed3cb401354b5bd9
2016-07-11 16:57:14 +00: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