Commit graph

339 commits

Author SHA1 Message Date
Max Semenik 6229cadd2e Revert my fix for summary pings in reverts
To redo more properly.

This reverts commit 74eacad8d6.

Bug: T190374
Change-Id: If178ed1a497df5276894f86d7a3312811651ce6b
2018-03-26 15:37:10 -07:00
Max Semenik 74eacad8d6 Properly handle undos/reverts and links in them
Bug: T189819
Change-Id: I6957157c02557f88e7a951667bd13dbb66c82193
Depends-On: Ib1dc0c323a9a5083b462421c68575fc22ad4af35
2018-03-16 16:20:39 -07:00
Max Semenik 467b13fe89 Ping users mentioned in edit summaries
Disabled by default for now.

Bug: T32750
Change-Id: I8012b82b6e27cc2612fb2302d0c9feb3f3623d62
2018-02-22 12:37:35 -08:00
zoranzoki21 62ebafd770 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: Iccf4c6e6f1c30daae37dfd91758fe7ffda6f81a8
2018-02-04 09:06:45 +00:00
Amir Sarabadani 30a5b88ea1 Use ExtensionRegistry instead of class_exists
Bug: T183096
Change-Id: I963704cdcfdbc97727f435eb16998c16c692ed01
2017-12-29 00:12:30 +01:00
jenkins-bot e5103dd848 Merge "PageContentSave WikiPage typehint" 2017-12-10 02:10:55 +00:00
addshore 086d82a488 ArticleRollbackComplete WikiPage typehint
Change-Id: Ie638e0b5346debe3e5aa3f8c8e75f15ed583103f
2017-12-08 15:56:59 +01:00
addshore 658e5aa56a PageContentSave WikiPage typehint
Change-Id: I17f173c69161ff9b347e6505a23f2280ccc26231
2017-12-08 14:49:55 +01:00
David Barratt 6593a0a427 Prevent loading or saving of zeros in the database.
When intval() fails, the function returns a zero. We should remove
the failures from the blacklist.

Bug: T178512
Change-Id: I89ad680a287da16c2fbd6aa4d53a725142429144
2017-11-17 12:34:54 -05:00
Huji Lee f97ce8f437 Set a default value for $reason in onUserGroupsChanged
This will help avoiding errors in unit tests

Bug: T180292
Change-Id: I89e83bd66b7a976b7b5233c897d76000373a31ef
2017-11-11 20:54:59 -05:00
Reedy 7ae0321f09 Remove pre-authmanager code
Bug: T178027
Change-Id: I305bc2974fe4181feb3d84e2fa21f78e6b5d83f7
2017-10-12 01:28:09 +01:00
David Barratt 3ba76f7faa Use User Ids instead of User Names for Echo Mute
The echo mute list uses user names which are not stable. User ids should be used instead.

Bug: T173475
Change-Id: I947bcf37a8f85aaa105776d368dbd0ab76823aeb
2017-10-02 19:39:40 -04:00
Umherirrender 5b4730c9bc Improve some parameter docs
Change-Id: Ie71fb080926781f2905e6264be060203c56185ea
2017-08-09 17:21:10 +02:00
Ela 07cac5c9f7 New Article Reminder API
This will be used to submit a new article reminder, for a specified date.
The delay is not implemented yet.

Bug: T166973
Bug: T167450
Change-Id: I773bbe98e781957912350c481c850b3263cb1821
2017-07-19 11:07:22 +00:00
Kunal Mehta 5a290dd1a2 build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: If606dd5a45d52441ebf677305bd1a9f72ee30fd7
2017-07-01 08:16:23 +00:00
jenkins-bot a1f09d5cd9 Merge "Adding the first step in order to enable the visualization of the Article Reminder feature." 2017-06-30 17:01:15 +00:00
Ela a4974ef1e1 Adding the first step in order to enable the visualization of the Article Reminder feature.
Includes feature flag, presentation model.
Temporarly hooks to new user creation.

Bug: T165755
Bug: T165754
Change-Id: Ic0a2ca07b0cd1597e5534bb1f3b748beb215ddfc
2017-06-30 19:45:24 +03:00
jenkins-bot 3bfdff2dfc Merge "Improve UI for blacklist preference" 2017-06-30 14:31:14 +00:00
mdew192837 c64422181b Improve UI for blacklist preference
Bug: T150419
Depends-On: I44e72205880d152639ee823238dc5ab84d34402b
Change-Id: I4c872960efd858d2885f1ee9163047c449f4f212
2017-06-30 02:04:37 +00:00
Kunal Mehta 95f83de225 phpcs: Fix "MediaWiki.Commenting.FunctionComment.WrongStyle" issues
Change-Id: Ieb1d52e6fd4e1de54e6f1bbfde849acd54fbe0dc
2017-06-22 14:14:28 +00:00
Kunal Mehta aaf061c725 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ExtraParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I8401abf121a7413fa191d7bc535e0ddd6cf8c3f7
2017-06-22 14:13:28 +00:00
Kunal Mehta 5d2cde1022 Implement per-user notification blacklists
- Disabled by default, is a gated preference by wg variable
- User specifies blocks in Echo preferences
- Uses a TextArea with username separated by new lines as input
- Still allows notifications to come through on a user's talk page
- Cache the blacklist and whitelist

Requested at
<https://meta.wikimedia.org/wiki/2016_Community_Wishlist_Survey/Categories/Miscellaneous#Allow_users_to_restrict_who_can_send_them_notifications>.

Bug: T150419
Change-Id: Ibf548da4aa600bdc7848cba1947436e56ac48a4a
2017-05-24 16:09:04 -05:00
This, that and the other 3f99672d5e Add proper message when user group expiry is changed
There's a lot more that could be done to improve user "rights"
notifications (really user group notifications), but this will do for now.

Bug: T159301
Depends-On: I5d32445f8e5b41599889b8488a2431e7a908f858
Change-Id: I27d52bc5c39219c832bf63a491faa1e421b0c024
2017-04-10 11:38:49 -07:00
WMDE-Fisch f714ff5d74 Replace deprecated Context::getStats() with MWServices::getStatsdDataFactory()
Change-Id: Ia0791472c3569edc269d993bd0d91becd56e70da
2017-03-17 12:16:28 +01:00
Ed Sanders d4d325e7e6 Use words for describing notification counts in HTML text node
The text is hidden by CSS so this will not affect regular users.

Bug: T160277
Change-Id: Iabb557a6ea2de82b488a5a40c9b5fd966270f1b0
2017-03-12 19:37:23 +00:00
MtDu 185e68a803 Support loading of secondary icons in RLEIM module
Before, secondary icons, such as linked, changes, thanks, and
userSpeechBubble were loaded in mw.echo.ui.icons.less. Now, an
extra icons attribute is passed when the module is loaded, allowing
RLEIM to know which icons to load. If this attribute is left out,
an MWException will be thrown.

Bug: T159394
Change-Id: I9b36a74bcf1da0d1c698845bd067b226fb81ac96
2017-03-01 23:45:04 -06:00
Thiemo Mättig 0a7b8edc0b Fix broken DatabaseUpdater::dropExtensionTable call
The issue was introduced in I9f6d4041b16c6d1d0414ee8e81536a59d0aba3d4
Ib901dd95ddd77f6a1fc700499f9f3815c0ae01d0 made it worse, I'm afraid.

Bug: T157651
Change-Id: I6a50bf86cf2a44688877d16a77d1545ecdef7527
2017-02-27 16:13:06 +01:00
Gergő Tisza e66f98e296 Fix method name in LoadExtensionSchemaUpdates
Bug: T157651
Change-Id: Ib901dd95ddd77f6a1fc700499f9f3815c0ae01d0
2017-02-11 02:44:50 +00:00
Thiemo Mättig a37742b422 Fix typos and incomplete PHPDoc tags
Change-Id: I29382492a7afd14440019c0c478f5a81c2254f59
2016-12-28 12:57:26 +01:00
Stephane Bisson bff77edc7a Use the right counter for the right badge
Follow-up to Ib8aa673cf9e60ade80490ea0eccb7453d3747cd0

Bug: T142454
Change-Id: I086383a3002d28c2af8f3d8b5189bd7a58b02e98
2016-12-22 16:08:27 -05:00
jenkins-bot f8fc22bada Merge "Adjust unread counter position based on length" 2016-12-21 10:29:00 +00:00
Stephane Bisson 01a1924187 Adjust unread counter position based on length
Move unread counter to the left (or right, in RTL)
when it's longuer than 2 characters so as to
have harmonious spacing between the counters and
the next link on the toolbar.

Bug: T142454
Change-Id: Ib8aa673cf9e60ade80490ea0eccb7453d3747cd0
2016-12-20 13:40:54 -05:00
cenarium 56abaaf434 Get undone revision id from hook param instead of request
The PageContentSaveComplete hook is now inside a deferred update, so
when using the API, 'wpUndidRevision' is no longer present in the
request. This gets the undone rev id from a new param added to the hook.

Bug: T153567
Change-Id: Id539a7db8d8f5e902177845bd212b4d6c2500f89
Depends-On: I50dcb841cd0616acc2d69c3a685ba3cb339986c3
2016-12-18 15:46:17 +01:00
Roan Kattouw b758cc5d5a Follow-up d66771523c: unbreak ext.echo.emailicons module
When generating extension.json, I missed the fact that
this module has a dynamic localBasePath (set to $wgExtensionDirectory),
and this turned into "localBasePath": null.

Instead, register this module dynamically.

Bug: T153261
Change-Id: I61709d6ea0948dd983ab41c9457adda434525bb7
2016-12-14 15:09:25 -08:00
Stephane Bisson 61b602e961 Fix unread notification count caching
Purge all cache when unread count changes and
repopulate on read.

Also fix client-side estimation when
marking a foreign notification as read.

Bug: T151389
Change-Id: I62def3d40a5640e26c234bb0335bc506dbf864a0
2016-12-09 09:23:59 -05: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
paladox d66771523c Add extension.json, empty PHP entry point
Bug: T87910
Change-Id: I945e0b60ff4de88a9ac2144a0af54bd22d291cc6
2016-12-05 15:54:26 -08:00
Roan Kattouw 49974544ba Split up $wgEchoConfig
$wgEchoConfig is a deeply nested structure that ExtensionRegistry can't handle well.
It also combined different things, and the version number was used for two
separate purposes.

Split this out into $wgEchoCacheVersion, $wgEchoEventLoggingVersion
and $wgEchoEventLoggingSchemas.

Change-Id: I2f9d5d111f7925fb057d423a3e7064bff5040205
2016-12-05 15:44:12 -08:00
jenkins-bot 7fa34bcfba Merge "Add a primary key to the echo_notification table" 2016-11-23 18:35:53 +00:00
Kavitha Muthu d3d61409d3 Show orange alert and provide hook
Show orange alert for all notification types in the edit-user-talk
category and provide a hook to enable other extensions to prevent
the orange alert from appearing.

Bug: T137954
Change-Id: I0b49c3a5eb0a027f8839ab86e77c527357907dd0
2016-10-14 17:54:29 +00:00
Reedy f2cbec3753 Fix mw.org link for PageContentSaveComplete link
Seems I forgot to update it

Change-Id: I56ddd5488e6893e834abc1402120c072e8c309fc
2016-10-09 18:48:45 +01:00
Reedy 0cf447f20c Replace ArticleSaveComplete hook usage
Bug: T147559
Change-Id: Ia020095ff17c993b579ada9717bf1feb43ddb8ff
2016-10-06 17:23:09 +01:00
Roan Kattouw 8269970305 Remove unused $flags parameter for EchoSeenTime::getTime()
It was always set to 0, and we were using the old (pre-2015)
get() interface so it wouldn't have worked anyway.

Change-Id: Ie92b223a485a5d9d256d2dc69d4ff3807e838878
Bonus: remove documentation for nonexistent parameter for setTime().
2016-09-23 11:53:59 -07:00
Moriel Schottlender 3cb4663668 Update the badges' seen state when Special:Notifications is visited
When the special page is loaded, all notifications should be marked
as seen for both the no-js and JS versions.

Bug: T134855
Change-Id: I053ce07ca26a858fd42c9d070b7dce73cc161e4b
2016-09-15 14:19:35 -07:00
Catrope bba984c002 Revert "Make seen/unseen badge more consistent across wikis"
Has bugs, and will likely cause deployment problems.
This'll need to be reverted in wmf.19 at least
until we fix it up.

This reverts commit 00e0b9f45d.

Change-Id: Ia9d220ebcb607f96dee6bc856755305ed8501fcc
2016-09-13 14:21:32 -07:00
Matthew Flaschen 98c6cd9eab Fix seen time for new users
Until the user opens the popup the first time, everything should be
unseen, rather than nothing unseen.

Also, make the default 'everything unseen' if we forget their seen
time.

Change-Id: I99ff8d46d4fa2fab0db374ddff63727b18a68363
2016-09-09 17:46:34 -04: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
Roan Kattouw b9d4433ee6 Follow-up 00e0b9f45d: fix typo in method name
Bug: T145144
Change-Id: I7a517e2e9b011af1b3d3149f29cc34d5417599c0
2016-09-08 15:49:09 -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
Roan Kattouw fea95cdb49 Add a primary key to the echo_notification table
Take the existing unique index on (user, event) and make it the PK.

Bug: T136428
Change-Id: I659953d80bf3bcf3a6303fa6e09aefed2ecb1987
2016-09-07 21:49:09 -07:00