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
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
Add support for POST requests and tokens to EchoForeignRequest
and ApiCrossWiki, and add the ApiCrossWiki trait to ApiEchoMarkRead.
Change-Id: Idadaacd0d0c4a957bf2499049fc105a60c73bc52
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
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
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
Instead just use the system message `emailsender` like we do for all other
e-mails, which is thus translatable.
Change-Id: I7e58a3a4e224d551c6fae4a76fcba19fe838d3e9
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
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
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
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
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