Commit graph

4837 commits

Author SHA1 Message Date
Stephane Bisson 330810614d ApiCrossWiki: Handle needsToken() returning false
false ?? null evaluates to false, so for non-write modules we were
passing false as the token type instead of null, which breaks.

Bug: T204758
Change-Id: Ief25150ce8f4b4b64a224f97f3fd528883b2f326
2018-09-18 17:21:50 -04:00
Translation updater bot be440a475c Localisation updates from https://translatewiki.net.
Change-Id: Ic3ede8532d9567caa22c6d08525e8ff256be6560
2018-09-18 09:52:14 +02:00
Translation updater bot 58a9f2583d Localisation updates from https://translatewiki.net.
Change-Id: Ic63f271f66c2c984b48fbea0475d5ea5958a3223
2018-09-17 10:17:42 +02:00
Umherirrender 1345b056c2 Add @group Database to unit test
Used database by inserting pages

Change-Id: If97d9e6e525465ca3879003e71dd5e67fc0afdfd
2018-09-14 22:29:34 +02:00
Brian Wolff 983a01bdff Build: Make pass phan-taint-check 1.5.0
Disable some errors related to different members of an array
having different taints, and phan-taint-check conflating them.

Bug: T202383
Change-Id: Ic6c2c5bb7c6092d581e646358d836f55d5cf3222
2018-09-14 02:04:03 +00:00
jenkins-bot 16dc34eb51 Merge "Add @group Database to unit test" 2018-09-12 22:23:18 +00:00
jenkins-bot b255d9ec5a Merge "Remove obsolete scripts/generatecss.php" 2018-09-12 20:52:09 +00:00
Umherirrender 00fe420a1f Add @group Database to unit test
Follow-Up: I4cdc8130032340726c5d18d795cd2d6b6b58b307
Change-Id: Iac4458d24838198f530a5a0e738f6dc4db0f9b56
2018-09-12 22:38:23 +02:00
jenkins-bot 6e9b0449f4 Merge "Replace deprecated 'advanced' by renamed to 'settings' icon" 2018-09-12 16:45:29 +00:00
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
Kunal Mehta a7cf20d9fe Remove obsolete scripts/generatecss.php
Clearly broken, as it tries to include a non-existing Resources.php file.

Also it's pretending to be MediaWiki 1.23, which is plenty old.

It was supposed to be run via the Makefile, but that's been broken since at
least 111b671444. If this functionality of identifying duplicate CSS rules
is still wanted, I'm sure there's a better way to do it than with a hacky PHP
script and a ruby tool.

Mainly removed since it's causing a phan-taint-check-plugin warning (T202383).

Change-Id: Id1d117f41f93adec4bba7191843aa415c4049d5f
2018-09-09 17:07:26 -07: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
Volker E 8423a7ce53 Replace deprecated 'advanced' by renamed to 'settings' icon
Bug: T190581
Change-Id: I63f3252464cd6098e89ff49d0e9881440c6679f8
2018-09-07 19:57:10 -07: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