Commit graph

23 commits

Author SHA1 Message Date
Kunal Mehta b8b892bb98 Hard depend upon Echo in extension.json
This extension is useless without Echo, and the API modules already
disable themselves if it's not installed. Just absolutely require Echo
to be installed.

Change-Id: I653eea78668bfe0875bc5a33e2d45607106d4ee5
2018-04-11 01:00:30 -07:00
Niharika Kohli 896ea17303 Allow thanking for flow-lock-topic and flow-restore-topic
Bug: T191482
Change-Id: I3f5bd11d0c02ee25b305c73a708f995cb59e4624
2018-04-09 17:40:38 -07:00
Sam Wilson 2059e3ff4b Add revision-thanking links to some log entries
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.

Bug: T189752
Change-Id: I5f4e84c65d4fe2d95b20cdb3c3f9522ad3e5f422
2018-03-22 11:57:55 +08:00
Reedy 2735468029 Revert "Add revision-thanking links to some log entries"
This reverts commit 9f393ef9dd.

Change-Id: Ie76fef8dc25b1134f1f60da50a87b00115154041
2018-03-14 21:49:25 +00:00
Sam Wilson 9f393ef9dd Add revision-thanking links to some log entries
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.

Bug: T186763
Change-Id: I2af380d5cb06f19ef9eb5b232d95ad87379b5d9b
2018-03-13 09:33:15 +08:00
Max Semenik ed087b044c Reintroduce the API to thank for log entries
Originally introduced in b84eedc74e, it was reverted for security concerns.
New changes:
* Instead of bundling the log summary with notification, load it on display
* If the log event has been suppressed after the thanks for it has been sent,
  silently delete the event to prevent the confusion of linking to something
  zapped.
* Keep the 'already sent' cache key compatible with old format
* Validate the log id in the API
* Change ApiCoreThank::getRevisionFromParams() to ApiCoreThank::getRevisionFromId()

Bug: T186855
Bug: T188791
Depends-On: Ic5e9db0def857d9dcecbd06bf081c8c83712c1ea
Change-Id: I03aea7d9f4dfa0fe49639c53968deabf89999d2d
2018-03-06 13:08:47 +08:00
MaxSem 3b2397fea9 Revert "Add support to the Thanks API for thanking log entries"
This reverts commit b84eedc74e.

Bug: T188791
Change-Id: If55ed6cbb5da34c0034da3cc564c6a8ff82448d2
2018-03-02 22:59:20 +00:00
Sam Wilson b84eedc74e Add support to the Thanks API for thanking log entries
Add a 'log' API parameter (for the log ID to thank), and add
a whitelist config variable for specifying which log types are
thankable.

Bug: T186855
Change-Id: I58ae90c9729c0066f952e90fca2cf99b029d0d9b
2018-03-01 14:57:57 -08:00
jenkins-bot 9c708f1ac2 Merge "Add jquery.cookie dependency" 2018-02-24 00:07:51 +00:00
Sam Wilson 78831d2b68 Rename files and classes in preparation for adding log-thanks
Bug: T186855
Change-Id: I20f5d200c33e395aca9489b73d0ed9b1d0ad5b8c
2018-02-21 12:49:21 +08:00
Sam Wilson 84834d5b41 Add jquery.cookie dependency
Bug: T187851
Change-Id: I6158f557cbafcfbca7e6c7d3e0c5960250133e46
2018-02-21 11:50:22 +08:00
Sam Wilson 2e7e5e0190 Move classes to includes/ and rename some to match class names
For conformance to coding standards. This removes an exclusion
from the phpcs config.

Change-Id: I1481a3e7e68a81daf310ea3c7bf9dc48cdaf140b
2018-01-30 10:32:03 +08:00
Roan Kattouw 6bb7939a79 revthank: Clarify confirmation message and change yes/no messages
Bug: T159302
Change-Id: I49ac7d644f207fe76a49efd650b727e33049b3af
2018-01-19 17:07:42 -08:00
Matthew Flaschen 545a7de5e2 Add missing jQueryMsg dependency for mobile diff view
Bug: T170917
Change-Id: Ibca76902e0d748b95bb57e871993a4dc2664d5cd
2017-07-18 15:27:41 -04:00
Fomafix 2d0c8bd0f8 Fix module dependencies
* Change dependencies for 'ext.thanks.mobilediff' from
  'mediawiki.notification' to 'mediawiki.notify' because
  ext.thanks.mobilediff.js uses mw.notify and not mw.notification.
* Add module 'mediawiki.api' to dependencies for 'ext.thanks' because
  ext.thanks.thank.js uses mw.Api.

Change-Id: Icae08555c5ec0297c390e5161f9269b9c84f1145
2017-06-27 15:28:12 +02:00
jdlrobson 35964a6c77 Remove MobileFrontend toast dependency
Rather than using mobile.startup, switch
to using mediawiki.notification which is more
lightweight and does same thing.

Bug: T155801
Change-Id: I23d75272602766e24e8b01410f4a88609eda6dee
2017-01-26 11:56:18 -08:00
Reedy b96f1a8b70 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: Ic856aa0d3d7af53f1405ceee43aff41bface3b58
2016-08-05 17:40:28 +01:00
Stephane Bisson 245190c451 Cleanup old notification config
* Remove unused formatters
* Remove old formatter config
* Remove unused messages

Bug: T121612
Change-Id: I4c49c12bcf1366cd7a786aadaab6dfed67a3428a
2016-07-20 11:25:05 -04:00
Prateek Saxena be2ed5f959 Use OO.ui.alert() instead of plain alert
Bug: T128891
Change-Id: Ib5d47bad48e8d42098de19a2c87dd863a38c2a2d
2016-07-15 20:55:21 +05:30
Stephane Bisson b52fd0ea6f Make thanks notifications expandable bundles
* edit-thank
* flow-thank

Bug: T120152
Depends-On: I1507cae360f45cc87f2d60e966b4d047abfa202d
Depends-On: I91abb2dded9ab7f124aaa798dd07c52576ee791b
Change-Id: I21e36d1874967495d9541f621481cfccf54b7f19
2016-06-27 10:02:59 -04:00
Michael Holloway a93a610abe Remove mobile.special.mobilediff.scripts dependency
The mobile.special.mobilediff.scripts module was removed from
MobileFrontend[1] but remains listed in its extension.json and as a
dependency here.  This removes the dependency so it can be removed
from MobileFrontend.

[1] See I40ac27e56fcc3ccc58870660d0ed7353c7a17748

Bug: T131757
Change-Id: I399ef6a0abaeaf3ca10461f4579a0a3fcdab9df3
2016-06-18 17:02:24 -04:00
Brad Jorsch 918b74ea9e Use LocalUserCreated hook instead of AddNewAccount
Since the extension is using short array syntax, I'm going to guess
there's no need to complicate it by worrying about compatibility with
MediaWiki core < 1.26.

Bug: T135065
Change-Id: I81dd764940ebb400f3ecdf15934f6f501c05ea9c
2016-05-25 14:42:20 -04:00
ananay f04e86b571 Convert Thanks extension to use extension registration
Bug: T88056
Depends-On: I0d1abbb251f4a6d126d58668d1281a6f1550b459 
Change-Id: I6afff0651690a8fcd7a410b8ffc3fe80d530ea69
2016-01-07 19:00:29 +00:00