Commit graph

4826 commits

Author SHA1 Message Date
Translation updater bot 2c786bb298 Localisation updates from https://translatewiki.net.
Change-Id: I86526abe2b64853171dbe786246758fddd46002b
2018-09-12 09:18:48 +02:00
Ed Sanders 2c089e075d build: Update linters
Change-Id: I9747097fdf725992710f97d4ce4ea49fd611df1b
2018-09-11 23:46:52 +01:00
jenkins-bot 8fff5360d9 Merge "Fix phpunit @group annotation" 2018-09-10 09:11:13 +00:00
Translation updater bot cebbc2e64b Localisation updates from https://translatewiki.net.
Change-Id: I064146365ec2923aedca1483352b7c8f0768ed94
2018-09-10 09:31:53 +02:00
Umherirrender 8429547776 Fix phpunit @group annotation
Change-Id: Ic6c2c5bb7c6092d581e646358d836f55d5cf38b0
2018-09-09 20:41:59 +02:00
Translation updater bot 1c51a034c5 Localisation updates from https://translatewiki.net.
Change-Id: I9c254edbdeb21c52b3ee2178f78fda3fe7bc8861
2018-09-09 10:36:05 +02:00
Translation updater bot 615ff2eb57 Localisation updates from https://translatewiki.net.
Change-Id: I78d8fdcae73a6ae8246f9189c317763f0335764b
2018-09-08 10:39:14 +02:00
Translation updater bot 087a41faaf Localisation updates from https://translatewiki.net.
Change-Id: I6c5ca5c1dddd8e373fa7a9571c41290120ec4dcb
2018-09-07 09:02:39 +02:00
daniel c06ca6d111 Test data providers should never access the database.
Any database access in test providers is hitting the live
database, not the test mock!

Change-Id: I01d8c41ed30cfaf68642c218090147ac39757c5e
2018-09-07 01:24:52 +00:00
Translation updater bot df9b9e14a9 Localisation updates from https://translatewiki.net.
Change-Id: I22dc0d499d79d9d5c22e73b7d214c87a38a81dac
2018-09-06 09:01:04 +02:00
jenkins-bot 9eebe652a7 Merge "Fix HTML escaping on Special:DisplayNotificationsConfiguration" 2018-09-05 12:56:57 +00:00
jenkins-bot b6f4e9d133 Merge "Make markasread parameter work cross-wiki" 2018-09-05 12:40:34 +00:00
jenkins-bot 9fad958301 Merge "Use API proxying for markasread requests in the front end" 2018-09-05 12:40:31 +00:00
jenkins-bot 4c2e69fadb Merge "Add cross-wiki proxying to the action=markasread API" 2018-09-05 12:40:30 +00:00
jenkins-bot 9cc47ceac8 Merge "Rename ApiCrossWikiBase -> ApiCrossWiki and make it a trait" 2018-09-05 12:35:29 +00:00
Translation updater bot 624540b5c6 Localisation updates from https://translatewiki.net.
Change-Id: I7cd7de25c15b94451d5774f95390d9a72ae3fadf
2018-09-04 22:19:32 +02:00
Roan Kattouw 871a5282d0 Use API proxying for markasread requests in the front end
This will prevent these requests from being blocked by browser plugins
like Privacy Badger and AdBlock.

I believe this eliminates the last foreign requests in the front end, so
we should clean up and simplify the now largely unused hierarchy of
API-related classes.

Bug: T121930
Change-Id: I74c22514409ad7e206a413306065a0c62d2e793d
2018-09-03 13:31:53 -07:00
Translation updater bot 994b842d4c Localisation updates from https://translatewiki.net.
Change-Id: Ia040a9f55f02c790aee473fc3614d73f05e5a9c8
2018-09-03 22:15:06 +02:00
Bartosz Dziewoński 4b8916c405 Fix HTML escaping on Special:DisplayNotificationsConfiguration
The labels for individual options are treated as HTML, not as text.

Change-Id: I5c2ae2d3a1dcaa3b85a2b47ed05952db28ea508e
2018-09-03 21:16:37 +02:00
Roan Kattouw 7a816f8d26 Make markasread parameter work cross-wiki
Add a markasreadwiki parameter, and use cross-wiki API proxying to mark
the specified notification(s) as read on the originating wiki.

This allows notifications to be marked as read when the primary link is
followed, even if the primary link points to a different wiki.

Bug: T179765
Change-Id: Id7e1e11997173e1578e33cd189dc0f93a5e4ba63
2018-09-03 10:59:31 -07:00
Roan Kattouw 55a5823d45 Add cross-wiki proxying to the action=markasread API
Add support for POST requests and tokens to EchoForeignRequest
and ApiCrossWiki, and add the ApiCrossWiki trait to ApiEchoMarkRead.

Change-Id: Idadaacd0d0c4a957bf2499049fc105a60c73bc52
2018-09-03 08:07:39 -07:00
libraryupgrader 4728b3332c build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
And updating CoC link to use Special:MyLanguage (T202047).

Change-Id: Ic18c7ae9b70c18ffb321967aae7e9a684acfc625
2018-09-03 01:46:10 +00:00
Translation updater bot 558d68eb11 Localisation updates from https://translatewiki.net.
Change-Id: I946de56e6f284415c120de2f4409877107ba90f5
2018-09-01 22:33:33 +02:00
jenkins-bot c9afa64579 Merge "Always place items outside menu if there's less than two of them" 2018-08-30 21:10:31 +00:00
Roan Kattouw a90890582a Rename ApiCrossWikiBase -> ApiCrossWiki and make it a trait
That way we'll be able to mix it into non-query modules as well.

Unfortunately, PHP traits don't let overridden methods call their
original versions, which had to be worked around in a few places:
- $this->foreignNotifications can't be initialized in the constructor
  any more, so it's now lazy-created through $this->getForeignNotifications()
- Adding the 'wikis' parameter to getAllowedParams() now happens by
  calling getCrossWikiParams() rather than calling the parent
- Overriding getForeignQueryParams() can't call the parent anymore, so
  instead we just inline it

Change-Id: I415e6d921819fc1f7869c7d2f8bb62830a84c2a1
2018-08-29 18:03:16 -07:00
Željko Filipin 4a4ad9818a Selenium: Simplify selenium-daily NPM script
selenium-daily now just calls selenium-test. Environment variables are set up in
the Jenkins job, so they are removed.
selenium-daily might seem redundant, but it provides flexibility. In case a
repository does not want to run all tests daily, that's easily fixed by updating the
selenium-daily script.

Bug: T188742
Change-Id: I8090acd9a00c68a41784e72ae7400835b4eb6465
2018-08-29 15:08:42 +02:00
jenkins-bot a5d17463d4 Merge "Escape messages used in HTMLSelectField 'options'" 2018-08-29 10:52:44 +00:00
James D. Forrester 918a19efac Drop $wgNotificationReplyName, instead let just show the e-mail
This is what MediaWiki itself does. It's not great, and isn't any more
translatable than a config setting, but consistency isn't valueless. In
future, with T202326 we may wish to vary this, but for now this is
simpler.

Change-Id: I76fca8ee255c65ab9b7e988d44de0d0fbd3c84b7
2018-08-29 01:03:54 +00:00
James D. Forrester 92b2df6f3e Use $wgNoReplyAddress rather than $wgPasswordSender for generic Reply-To
Change-Id: I4712d4fe02caf019a3b45f6efe82453eec59a50f
2018-08-28 21:54:47 +00:00
James D. Forrester d2ab6527e9 Drop $wgNotificationSenderName
Instead just use the system message `emailsender` like we do for all other
e-mails, which is thus translatable.

Change-Id: I7e58a3a4e224d551c6fae4a76fcba19fe838d3e9
2018-08-28 18:06:59 +00:00
jenkins-bot 229471d1b0 Merge "Fix page-linked notifications" 2018-08-28 00:14:22 +00:00
Roan Kattouw a01ebbc045 Fix page-linked notifications
These were broken because e8632ab0f6 in MW core stopped passing a
triggering user to LinksUpdate.

This commit takes the user from the Revision object instead. In weird
cases that might be different from what LinksUpdate says, but
page-linked notifications don't use the agent in their rendering anyway.

Also remove the code that refused to route events to a page creator if
they didn't have an agent. It's perfectly legitimate for events not to
have an agent, that shouldn't preclude them from using non-agent-related
locators.

Bug: T200119
Change-Id: Ia31131b1d1b2640d962ab7f3e573599c43ae50d4
2018-08-27 10:46:39 -07:00
jenkins-bot 6072511b47 Merge "Fix common typos in code" 2018-08-27 11:33:30 +00:00
Translation updater bot 16dcd8e771 Localisation updates from https://translatewiki.net.
Change-Id: I48b56ff669103e3e167cc996d33b3b7b24cddb00
2018-08-26 22:32:28 +02:00
jenkins-bot 8a759ce1b7 Merge "Split long lines over 140 chars" 2018-08-26 18:35:58 +00:00
jenkins-bot b7815f435b Merge "Remove count() of null value" 2018-08-26 07:42:35 +00:00
Zoranzoki21 00dfbd1af7 Fix common typos in code
Bug: T201491
Change-Id: Ibd287f220720c33b82847475fbe88b586557de69
2018-08-25 17:35:13 +00:00
Umherirrender 5daca5ee1a Escape messages used in HTMLSelectField 'options'
Change-Id: I10aaa57d376f611997f47fa1fe3bff859370820b
2018-08-25 13:20:01 +02:00
Umherirrender 2cd8d9d0eb Split long lines over 140 chars
This makes the code easier to read even on big screens

Change-Id: I14bfb97b2986f389ad11a6ddc97ba61468774782
2018-08-25 12:51:14 +02:00
jenkins-bot b6bfaa2e2c Merge "Explicit convert Message objects when used as string" 2018-08-25 06:17:21 +00:00
Stephane Bisson a5ececbb7e Initialize $success
Followup I85452d0f0afe974d26a575e000f6ae2ceeddf06c

* initialize "$success = true" before using it in
  a loop to keep track of the overall success of
  all batches.

* Add check for readOnly db in markUnRead() and
  markAllRead(), like it was done in markRead()

Bug: T202672
Change-Id: Ifdfa93059268d5b02ba3e0e885661ce593845791
2018-08-24 06:15:12 -04:00
Translation updater bot 8bcc8107b0 Localisation updates from https://translatewiki.net.
Change-Id: Ice770c990b7fb6e907b607637e8f4074039c5ba6
2018-08-23 23:25:58 +02:00
jenkins-bot c419bcf45e Merge "Drop $wgNotificationSender, written to but never configurable" 2018-08-23 20:58:49 +00:00
jenkins-bot b0d83815b9 Merge "Don't send email notifs to blocked users if $wgBlockDisablesLogin is true" 2018-08-23 19:02:48 +00:00
Roan Kattouw 2b0929a4b1 Don't send email notifs to blocked users if $wgBlockDisablesLogin is true
Bug: T199993
Change-Id: I47ed3599d61ca8177cdd0820dea4089fdb087d82
2018-08-23 11:39:25 -07:00
Umherirrender 516eeda19e Remove count() of null value
php7 gives:
count(): Parameter must be an array or an object that implements
Countable
null or [] are both evaluate to false, so just remove the count

Change-Id: Id92dbd48f308d1e9dffa086699e0e944744aeeaa
2018-08-23 18:07:22 +02:00
Umherirrender a0ad95b63f Split long lines over 200 chars
This makes the code easier to read even on big screens

Change-Id: Iebc2ca785690abc6e7998c6f6078daf0bd01ccf8
2018-08-23 10:33:25 +02:00
Umherirrender e89206ce4a Explicit convert Message objects when used as string
This makes clear which escaping should be used.
In all cases it needs Message::text, because there are used inside
Html::element. There is no visual different.

Change-Id: I17474a7d5f057321e8c759d4bf94c8234c7a89c7
2018-08-21 14:16:22 +02:00
James D. Forrester eefeb6d031 Drop $wgNotificationSender, written to but never configurable
Instead just use $wgPasswordSender explicitly. This also allows us to drop the
extension registration callback function, which is a performance improvement.

Bug: T200390
Change-Id: I08d2f040c5ad8feb395a2e8e176f91636efe1d3d
2018-08-20 13:41:05 -07:00
Translation updater bot 7f48cfbdb9 Localisation updates from https://translatewiki.net.
Change-Id: Id510e86354415e3a4ef7482ad10a4797c792c38a
2018-08-19 22:38:56 +02:00