Commit graph

62 commits

Author SHA1 Message Date
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
Stephane Bisson 404d74e600 Make sure bundleString is event-specific
Add event type to bundle string to make sure
it is unique to those events.

Change-Id: I23abc4dc14c1a9a7c6ddfc94cd1c2ca97d1138ad
2016-06-30 11:38:51 -04:00
jenkins-bot b417af2476 Merge "Re-categorize notifications" 2016-06-28 20:41:54 +00:00
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
Roan Kattouw 8f2c9bceb0 Re-categorize notifications
alert->message:
edit-thank
flow-thank

Bug: T123018
Change-Id: I80b343f295eb7fc970579052b4bc00d47a0f5dac
Depends-On: I69ca536b1458b3edd59b3638a1991db0297afe2e
2016-06-10 14:54:26 +02: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
James D. Forrester 03b8f88fff build: Add doxygen, use composer for phpcs, make pass
Change-Id: I939d6f4d989cf21c0f817d262bf3e4acedcf2ffe
2016-04-25 15:42:04 +00:00
mhutti1 ee7ca911f2 HistoryRevisionTools and DiffRevisionTools no longer use $wgUser
Modified insertThankLink to use passed in $user object instead
of $wgUser.

Bug: T121369
Change-Id: I1c9d1ff211bcec7815369509c5c50fad60d74643
2015-12-21 20:16:51 +01:00
Glaisher 703642e40e Hide thanks button for botedits if bots are not allowed to receive thanks in mobile as well
Also only load 'ext.thanks.mobilediff' module if the recipient is not an IP.

Bug: T118686
Change-Id: I096d3b05a46590db426ae038f17f6e180fa5bf37
2015-11-24 22:47:56 +05:00
Roan Kattouw 190ace1ed7 Convert Echo notifications to the new system
* Add ThanksPresentationModel and FlowThanksPresentationModel
* Rename notification-thanks-flyout2 to notification-header-edit-thank,
  shift parameters around and add GENDER support for thanked user
* Rename notification-flow-thanks-flyout to notification-header-flow-thank
  and shift parameters around; this one did already have GENDER support
  for the thanked user

Depends on Idb975feaec in Echo.

Bug: T116847
Change-Id: Iab0f2311e7ffb6a9ce21cd76e564511d03805530
2015-10-28 17:29:55 -07:00
Matthias Mullie 4bc8576f9a Don't fatal when context doesn't know the title
Not sure exactly how the fatal was being triggered, but getTitle()
is documented to return either null or Title, so we should actually
guard for null values.

Bug: T104689
Change-Id: Ic45bbcc71291dc473cd65a48d1840a78d5b64ae1
2015-07-30 13:11:15 +02:00
Alexander Jones a6c8c093ab Make inclusion of API action=flowthank conditional on Flow being installed
This patch will only enable the API module 'flowthank' if Flow is installed,
instead of checking whether Flow is installed when the module is invoked.

Bug: T85521
Change-Id: I0183188dd17f035f3c89e40a9cb1a21421071aca
2015-06-25 17:05:51 -05:00
Kunal Mehta 5567537f62 Fix doc comment for BeforePageDisplay hook
The hook was changed in ccdca0d0d7.

Bug: T89676
Change-Id: Iea8c512d8cf14bc917deda357dcf5f4dca92ca12
2015-06-22 14:14:19 -07:00
Matthew Flaschen b3a74b2953 Further document Thanks gender (both en and qqq), and fix bug
thanks-thank was using plain, but this did not get caught because
the en value did not have a no-op example GENDER.  I've added
these to all of them, for both $1 and $2.  This also tells translators
they're both available.

Bug: T96527
Change-Id: I5130bbd60fe3c1c8051729758c2f2f4bea2b2030
2015-05-05 00:35:20 -04:00
Moriel Schottlender 0a5664ce5e Check the thanked user's gender for Thanks messages
Retrieve gender data for the thanked user for i18n message parsing
with the correct {{GENDER...}} data.

Bug: T96527
Change-Id: I14c831be51482682f2b628a15c79341a4f372c16
2015-05-04 17:16:09 -07:00
Matthew Flaschen e3414ba230 Put back removed code coverage annotation
Change-Id: I12b1880990e5f404881122e9e3bbaba72ddb7f3b
2015-02-19 17:43:38 -05:00
Kunal Mehta 121f4932b9 Register directory with UnitTestsList hook
Change-Id: I7a6498af48c0d62428bf012d5045ad3db60aa0cc
2015-02-19 20:51:59 +00:00
jdlrobson e02c334880 Add tests for rendering of thanks button on mobile diff page
This has broken many times and I want this test to ensure its protection
in future.

Bug: T86687
Change-Id: Iea01c5c7c1ba00de47182521eeba86c8aef03522
2015-01-28 12:48:08 -08:00
Kunal Mehta a20a33c72d Use Title::hasContentModel() instead of a direct comparison
Change-Id: Ic3cd8630d2dfc6d46eb951bfcdab83c78fb958b6
2014-09-19 01:08:46 +00:00
Matthias Mullie 5dba803d92 (bug 67966) Add GENDER support for recipient
As outlined on https://translatewiki.net/wiki/Thread:Support/MediaWiki:Notification-flow-thanks/en_and_MediaWiki:Notification-flow-thanks/fr

Bug: 67966
Change-Id: Ia3888b5c0f39fe1cb7507b7e5990aefe2357a09f
2014-09-01 14:33:25 +02:00
Erik Bernhardson ccdca0d0d7 Support updated flow frontend
* Flow no-longer allows arbitrary html insertion, so remove
* Update ext.thanks.flowthank.js to work with thank links generated
  directly by flow.

Change-Id: I8ae14352f1b177446f3696ffadd6921a5125238e
2014-07-15 15:07:33 -07:00
wctaiwan ab8b7847c3 Change UI of special page and support Flow Thanks
Change the UI to ask for confirmation instead of allowing the user to
change the revision ID, disallow using Special:Thanks directly, and add
support for Flow Thanks.

Bug: 63509
Change-Id: I48ef5e51fd3ac76ff5caf6907bc53d09357634bd
2014-06-02 04:10:21 +00:00
wctaiwan dfb639af3e Call getAlphadecimal() directly
Relying on UUID::__toString() now triggers a notice, causing
unrelated patches to fail. This patch addresses the issue.

Change-Id: Ia94826a0e600adf8afd5908af75772b596ab8d0a
2014-04-15 03:54:00 +00:00
jenkins-bot 412d8f372f Merge "Add hover highlight to Thank link in Flow posts" 2014-04-01 20:57:47 +00:00
Erik Bernhardson 82039be262 Only use ->parse on i18n messages if required
Change-Id: I89e9d9aa4becde968900f7f07a302de791519004
2014-03-27 15:03:35 -07:00
Benjamin Chen 36b839ead2 Add hover highlight to Thank link in Flow posts
Bug: 62556
Change-Id: I3adb60d5b1c75500f8276cda8b8eaa2646bb1565
2014-03-21 04:04:04 +08:00
wctaiwan 98726b568b Add "Thanks" for comments on Flow boards
bug: 61930
Change-Id: Id37a14e3c75c63419fc34e0b7c2e21f74b3fa875
Co-authored-by: Bencmq <bencmqwiki@gmail.com>
2014-03-14 11:03:11 +00:00
Jackmcbarn 49c061de29 Fix mismatched parentheses
I have no idea how this ever worked properly, but it did.

Change-Id: I82efd5054c4f497cc28e06c88d33c654ecb7933a
2014-02-26 18:03:11 -05:00
jenkins-bot c811693ae9 Merge "Make the diff the primary link in thanks" 2014-02-04 20:16:20 +00:00
Jackmcbarn 75c8853265 Remove misleading Thank button from some diffs
To prevent thanking someone for the wrong revision, don't show the Thank
button unless the old revision is the parent of the revision being thanked
for. This needs I6ee956c5 in core to function, but it degrades gracefully
if it's not present.

Bug: 57721
Change-Id: I8f973a8a54db35838ce4c697c0310f67b2dba1a0
2014-01-29 01:47:55 +00:00
Jackmcbarn bafe6568e9 Make the diff the primary link in thanks
When viewing a thank message, make the link to the diff the primary link.
Visiting the user's user page is almost never the desired action when
viewing a thank notification. The link to the user page is no longer
present as a secondary link, but the notification-thanks-flyout2 and
notification-thanks messages both include a link from the user's name to
their user page.

Bug: 56225
Change-Id: If971385e6d1a47e394d06decf25db2c1b7cc2fb9
2014-01-28 16:43:53 +00:00
kaldari cdc91d7f54 Story 1604: Remember mobile thanks
If the user has already been thanked, make the button greyed out
and display the text "Thanked" instead of "Thank".

Dependency: Ife9f456a7a9cf74b1b54fdc6128feb230fd6f671
Bug: 59828
Change-Id: Ifab78fe62910c9c3f2a927a6a4bbe28fb953b160
2014-01-15 17:36:53 -08:00
jenkins-bot 31437cf89d Merge "Add Special:Thanks as a non-JS fallback" 2013-12-19 05:43:11 +00:00
Kunal Mehta 47e95c5852 Add handler for GetLogTypesOnUser hook
Change-Id: I2db58b81c40eec1ac0d858efad23001762269a6d
2013-12-19 03:35:48 +00:00
Kunal Mehta 06360b6d0d Add Special:Thanks as a non-JS fallback
If the user has JavaScript disabled, clicking
on "thank" will send the user to Special:Thanks
with the revision id already filled in. When
submitted, the form calls the API internally
and then shows the user an error or confirmation
message.

Special:Thanks is not a listed special page
since it's mainly intended as a fallback.

The API was modified to return the user name of the
editor who is being thanked if a new notification
was created.

Bug: 49161
Change-Id: I7ba4664b92bb0da425784350487ed0e7ca352b4e
2013-12-05 23:23:21 -08:00
addshore 422f0f6062 Add really basic API tests
This also includes the unit test hooks

Jenkings job will be added with I6ec2edf62b9

Change-Id: Id085db7096db420416e9fba72a65586d021f1c76
2013-11-04 16:38:23 +00:00
jenkins-bot 084bd53382 Merge "Only allow Thanks for public revisions" 2013-10-30 17:47:04 +00:00
Kunal Mehta 05c7f89a8e Only allow Thanks for public revisions
Bug: 54100
Change-Id: Ied2846076ecf86b7045563fe5f2b0c002bd42647
2013-10-26 20:18:04 -07:00
Kunal Mehta 73554fa0ab Fix phpdoc
See https://www.mediawiki.org/wiki/Manual:Hooks/DiffViewHeader

Change-Id: I551c5b5a4f98503dad01c763032c5b1b86daba6f
2013-10-23 21:16:50 -07:00
Kunal Mehta 5e0277e9a5 Remove outdated comment
Preference was removed in 4c88b5973a.

Change-Id: Ibaa277b5468eda29a0c6b11eeed9c9985ed15580
2013-10-23 20:45:53 -07:00
Kunal Mehta 86e031bcdd Fix phpdoc comment
Change-Id: I38fdc9826cb78a08c8d04c8dc172509c6d11440b
2013-10-07 13:56:47 -07:00
bsitu 4c88b5973a Remove the deprecated user preference: 'vector-noexperiments'
In addition, Thanks is not an experimental feature anymore

bug: 54852

Change-Id: I10b63c3e5f659c06e72f7e9f925c1044eb1986ac
2013-10-01 22:59:55 +00:00
kaldari bd5bdba07e Migrating Mobile thanks into Thanks extension
Also making thank button for mobile capitalized.

Also update for new clickTracking code.

Also promoting to stable.

Dependency: I56e2c5bc69f85e83ab3dfd9b9e617dbb98661870
Change-Id: Ifaf44fe8994a8085c30522292bba8b768da533db
2013-09-26 18:42:13 -07:00
bsitu d4661cd379 Add gender support to two i18n messages
* thanks-thank-tooltip
* logentry-thanks-thank

Change-Id: Ib5e17695dda7db5b07db51bb20579d23f88666e5
2013-08-20 16:23:37 -07:00
jenkins-bot f070d0d6ab Merge "Remove unused i18n messages" 2013-08-10 01:46:34 +00:00
bsitu 269f6bafa2 Remove unused i18n messages
'email-body-message' is not used anymore

Change-Id: Iade9f3146cbfc0b5cde174ca002e44885bb0d352
2013-08-02 21:33:21 +00:00
jenkins-bot 31ff5b375a Merge "Adding new custom icon" 2013-07-10 18:35:22 +00:00
kaldari b053cd930f Adding support for primary and secondary links
Depends on Echo change I94aed697

Change-Id: I6654c74da12ee22beba8b479dd05ecf9fc890927
2013-07-02 10:42:20 -07:00
kaldari 7e927a62dc Adding new custom icon
Change-Id: I8e3d2bc7cadbf321bbe504d17621c99c035c978d
2013-06-28 13:44:17 -07:00