Commit graph

396 commits

Author SHA1 Message Date
jenkins-bot ccebb42186 Merge "Get rid of old flyout formatter code" 2016-02-09 18:34:36 +00:00
jenkins-bot f9b8202f4f Merge "Use current HTML formatter (for special page) instead of previous" 2016-02-09 18:22:33 +00:00
Stephane Bisson f7b0637d59 Fix 'user-rights' notification messages
Bug: T121661
Change-Id: I5b73001f2f748a39c3b28f6b571f076a51f8f785
2016-02-08 08:45:10 -05:00
Matthias Mullie 9fe71a1182 Get rid of old flyout formatter code
This code is completely useless:
* for format=flyout, the new EchoFlyoutFormatter.php will be run
* and even that one has already been deprecated as it was replaced
  by format=model (flyout html is now built in client)

Change-Id: Iea23abb66397ecc4efb575fe33fdbedc5b4e0f70
2016-02-05 06:56:15 +00:00
Matthias Mullie 1be7039660 Use current HTML formatter (for special page) instead of previous
The existing "html" formatter was used for the special page & is now
superseeded by the new-style "special" formatter. Previous "html"
notifications are no longer used & could even be broken.
Instead of keeping the old "html" formatter around, we should let it
use the new formatter (and eventually just kill that redundant format
in the API)

Change-Id: Ibbd40aafa9eee718b196ad62f6edc99629b263b4
2016-02-04 20:03:19 +00:00
Matthias Mullie 4f097b02d0 Get rid of $legacyMapping
We now have 'special' in $formatters, there's no need to keep
the mapping to the legacy formatter around.

Change-Id: I66f330e8c84a50858658361caef521a3e5717d58
2016-02-04 19:57:06 +00:00
jenkins-bot d5ec5d0d92 Merge "Deprecate ApiEchoNotifications.php format params flyout & html" 2016-02-04 19:55:34 +00:00
Matthias Mullie c94c8abb53 Deprecate ApiEchoNotifications.php format params flyout & html
Change-Id: Ib1db9dbec7a0980b10ba4dc1b3f62ea468437390
2016-02-04 12:38:19 +00:00
Matthias Mullie cc11b3c81a Allow certain users to be excluded
Right now, if certain users should be excluded, that would have
to be part of the user-locators already. This is annoying because
it's hard to write "generic" user locators when you want to exclude
just a couple of people in certain cases.
In Flow, for example, we have user-locators for users watching a
board or topic. We don't want to send the notification to people
that have also been mentioned in that post (they'll get a separate
notification). We could build that exception into those
user-locators, but then we couldn't re-use them in other places...
This basically means we couldn't use EchoUserLocator::locateUsersWatchingTitle,
we would have to roll our own that also excludes mentioned users.

Instead, this lets you add 'user-filters' (that functionality
actually exists already, but is not currently exposed), which
lists users to not send the notification to, even though they could
be in a user-locator.

Bug: T125428
Change-Id: Ifa0e2d3283f57624af4c5ec264f9f66223508e83
2016-02-04 11:20:59 +01:00
Stephane Bisson ffc4365b08 Make sure to use array_values for group names in user-rights notifications
Bug: T125279
Change-Id: I49b5fe5cf27aef5b710a5d95a064b09b08612667
2016-02-01 13:30:25 -05:00
jenkins-bot 59fc1b6f85 Merge "Add snippet to mention notification" 2016-02-01 09:10:05 +00:00
Stephane Bisson a4b91ebef8 Gender support for viewing user in user-rights notifications
Bug: T125251
Change-Id: Iadd341a3bb555c91152528bbddaf2a660b8dcc77
2016-01-29 16:07:39 -05:00
jenkins-bot 44ae5aefae Merge "Support GENDER in mention-on-user-talk messages" 2016-01-29 16:47:23 +00:00
jenkins-bot e750abdf43 Merge "Fix lego messages in 'user-rights' notification" 2016-01-29 16:30:06 +00:00
Stephane Bisson 475d724b45 Support GENDER in mention-on-user-talk messages
Also refactored getHeaderMessageKey for grep-ability

Bug: T56433
Change-Id: Ia844c3e0008c7ed24dcc093e3eab41decbcaeb2a
2016-01-29 11:19:12 -05:00
Stephane Bisson 779b7030d9 Truncate usernames, titles and excerpts in notifications
Bug: T121822
Change-Id: Ia0a52926133ab7e04d7d9c2a095ef8f9d0871a49
2016-01-29 07:04:23 -05:00
Stephane Bisson cd7edf0378 Rephrase mention notifications
Split mentions into 4 cases:
 - Mentioned on article talk page
 - Mentioned on agent's talk page
 - Mentioned on another user's talk page
 - Mentioned on any other page

Adjust secondary link
  icon: article or talk
  text: without namespace for article and article talk

Bug: T56433
Change-Id: Ibf965dad4f9cc468fdd4321b2450d6eaec0ac1d7
2016-01-29 07:04:23 -05:00
Stephane Bisson 2c7136ecb7 Fix lego messages in 'user-rights' notification
Bug: T121661
Change-Id: I8386429a36182dbc44b45990506a42cbeef115ad
2016-01-28 11:43:04 -05:00
Bryan Davis 3f7436c959 Wrap CallbackFilterIterator in a condition check
Wrap the CallbackFilterIterator backport class in a conditional check
for PHP runtimes that include the class natively. This really should
only be needed for linting as the class is loaded via an autoloader
and thus should not be loaded if the runtime already has it
available.

Bug: T124828
Change-Id: I39d27385186d4693a8babdd2b818e6b4bc16255a
2016-01-26 14:57:18 -07:00
Stephane Bisson 386bc86233 Add snippet to mention notification
Bug: T121817
Change-Id: I9a77d8ecb1b91f6a196f17777cfabf97c0b59da7
2016-01-21 10:19:14 -05:00
Reedy 085d6fe3a1 Call UserMailer::send() with reply to address correctly
Change-Id: I240c61a154af591e852cd9ddc537365bc22d2855
2016-01-21 01:02:05 +00:00
Roan Kattouw 119af0e09a Make the mention notification actually link to the right section
getLocalURL() does not take the fragment into account.

Bug: T123847
Change-Id: I4f8b11c1693ebfcdae69f001057f5db15c11b94f
2016-01-19 09:35:26 -08:00
Justin Du 67d8394cd0 Deprecated use of 5th parameter in UserMailer::send
*In EmailBatch.php line 287

Bug: T123641
Change-Id: I7f75448b0f6839c6d104eedca0f0c2f7d0780337
2016-01-18 21:19:42 +00:00
Stephane Bisson 9e536c91d4 Rephrase Echo 'edit-user-talk' notification
Bug: T123934
Change-Id: If053f9787127ca4488c51a663000a48bc717cadf
2016-01-18 15:44:18 -05:00
jenkins-bot 238097e364 Merge "Use globe icon for cross-wiki bundle" 2016-01-18 20:28:53 +00:00
jenkins-bot 18bffba313 Merge "Display revert edit summary in revert notification body" 2016-01-18 19:46:49 +00:00
Stephane Bisson d7d70a06a1 Display revert edit summary in revert notification body
Only display when it's different than the pre-populated
edit summary (Undo revision 123 by User).

Bug: T121808
Change-Id: I5a00ff174fd31fdbf776a06b7b9375f63b921677
2016-01-18 10:14:15 -05:00
Matthias Mullie e7e55d4279 EchoModelFormatter extends EchoEventFormatter
There was no point in letting it extend EchoFlyoutFormatter instead
of the base EchoEventFormatter. The only things in EchoFlyoutFormatter
are formatModel & getIconURL, both of which aren't being called.

Change-Id: I89511530a41976974f4d51d55379a617dfe503ec
2016-01-17 22:26:34 -08:00
Roan Kattouw 3c543215aa Use globe icon for cross-wiki bundle
Bug: T123757
Change-Id: Ib97c0abb43aacba19e6b8d8a329c836e332927a2
2016-01-15 16:43:14 -08:00
jenkins-bot cb1041f5e1 Merge "Add icon to "View changes" secondary links" 2016-01-15 20:43:13 +00:00
Roan Kattouw e22ca687dc Actually respect notnoforn parameter
The parameter was added, but it wasn't looked at by any code at all.

Change-Id: Ib6b13e520621ad7c230a297ebae61d6a16dce57a
2016-01-15 09:47:12 -08:00
Roan Kattouw c345bef598 Add icon to "View changes" secondary links
Bug: T121736
Change-Id: I7dda877c26c99392c17702265380f4ea2a6e8049
2016-01-14 22:53:51 -08:00
Roan Kattouw e55754857c Work around $wgConf's uselessness
WikiMap is almost useful for this purpose, but not quite
because it doesn't provide the script path, only the article path.

Change-Id: I1627d58cab5ff518be3c3e14e05a53899b083503
2016-01-14 21:28:02 -08:00
jenkins-bot 33fe9a0038 Merge "Cross-wiki notifications integration" 2016-01-15 01:15:42 +00:00
jenkins-bot 2eed540186 Merge "Clarify some notification icons" 2016-01-13 22:53:27 +00:00
Justin Du 7d2a15d3bc Clarify some notification icons
* edit-user-talk
* mention
* user-rights
* emailuser

Bug: T121735
Change-Id: I72e382b9ff9d19c6acc0df507fdff65732b66450
2016-01-13 14:00:37 -08:00
Roan Kattouw 63eef35026 Cross-wiki notifications integration
Bug: T121829
Change-Id: Ifb52ad5605a56d27e5951479326689242a49430e
2016-01-13 09:47:57 -08:00
Kunal Mehta 4cd9aca385 Move Notifier.php to includes/
Change-Id: Iae4ca71a5e25eb70b9fece94052b29eeb79d7a1e
2016-01-13 09:25:22 -08:00
Matthias Mullie 72f687730f Get link of LinkNormalizer
All extensions seem to have been updated to use the current formats,
so we can get rid of this tech debt.

Depends-On: I7503db28b0d81fb818b525ea9362e49b9b56342a
Change-Id: Idbcbbf95eab1172015bceea4e8124ba4c639efa8
2016-01-12 21:56:52 +00:00
Matthias Mullie 2d72a0e748 Be more clear about what data types we expect in links array
Also updated description value in agent link: '' is used everywhere
else to mean "no description" (because that's exactly what '' is)

Change-Id: Ib77c0f1843593abf67e9d726a80bb4fbe1ec7d84
2016-01-12 13:50:43 -08:00
Stephane Bisson 60ddc76880 Update page-linked notification text
Bug: T121812
Change-Id: Ie875f105230c8364291a918b869b9c26dbdf1e83
2016-01-12 10:11:31 -08:00
jenkins-bot a29c62065c Merge "Add agent link to most notifications" 2016-01-11 22:46:41 +00:00
Stephane Bisson 421ba29a2f Add agent link to most notifications
Affected notifications are
  - edit-user-talk
  - email-user
  - mention
  - reverted
  - user-rights

Bug: T121737
Change-Id: I826cc6088b4f9c1aaef9e8adee0566d25982ed47
2016-01-11 14:34:39 -08:00
Kunal Mehta 7f0dafbe73 Don't parse wikitext in edit-user-talk snippets
Bug: T121994
Change-Id: I427def99f2773896feabaf6202e7f4eecd850be1
2016-01-08 09:22:20 -08:00
jenkins-bot 1ca53fe96a Merge "Fix casing of Whatlinkshere in page-linked presentation model" 2015-12-23 18:54:17 +00:00
Stephane Bisson 1eccdbcb49 Fix casing of Whatlinkshere in page-linked presentation model
It generates an annoying orange notice.

Change-Id: Ia548cd08e66db8ab381052874f21ccc49fb03981
2015-12-23 13:04:38 -05:00
jenkins-bot 7858d06537 Merge "Use UTC timestamps in flyout" 2015-12-23 15:48:16 +00:00
jenkins-bot 34ab32507a Merge "Replace EchoBatchRowUpdate with BatchRowUpdate" 2015-12-22 23:32:42 +00:00
Matthias Mullie 089d922ac7 Use UTC timestamps in flyout
We already output unix timestamp both in user preference timezone as well as
utc, but we only had the user timezone version for TS_MW format.
While we could change the frontend to use the unix timestamp format, I don't see
any reason not to also include the MW format in utc. Frontend can now easily use
that.

Also fixed creation of the moment object. The timestamp was created as UTC, but
the way it got there was wrong: it expects the timezone offset (Z) to be
included in the timestamp, which is not the case (so it just ended up at +0:00,
which was fine, but confusing). I removed the 'Z' and forced it to be
interpreted as utc.

Bug: T121813
Change-Id: I09403615a1ffbde5dd69af9914afdbdd86cbfe4d
2015-12-22 17:07:31 +01:00
jenkins-bot 60cd07bbd3 Merge "Add mw-echo-payload class to body in Special:Notifications as well" 2015-12-19 10:16:21 +00:00