Sqlite and MySQL are returning results in different
orders for the REST Search handler, which affects how it handles
de-duplicating results with redirects.
If the Redirect Target is processed first, the matched_title
field is not populated because that page is not a redirect.
If the Redirect Source is processed first, the matched_title
field IS populated because that page is a redirect.
Either way, we don't have duplicate results (which is the most
important part). Until the logic is consistent, remove the
matched_title check.
Bug: T302706
Change-Id: Ic3977655565aa9f6d6c184749706273b0315b7be
Partial revert of I0e30fdb6acba85cec4bb1499f7063ba6bfb0ffb2;
re-application of I3e1fe5e8112e3b1d487c46bc7fd8f924d65ce7fa and
I8f7b5e9257c7f283ded1a61e41d9e344f5cea67d
Bug: T301100
Change-Id: I90bea3fda48efdc7e915908d00535df220c4cc69
Enabling this setting will cause post-send deferred updates to be run
before a response is sent to the client, so the client can observe all
effects of their last request immediately.
This resolves a problem with some end-to-end tests that were failing
because the updates caused by one request had not landed in the database
by the time the subsequent request was made.
This patch re-enabled some e2e tests that were disabled because of this
problem. If $wgForceDeferredUpdatesPreSend works as intended, the tests
should again pass reliably.
Bug: T230211
Bug: T301100
Change-Id: I0e30fdb6acba85cec4bb1499f7063ba6bfb0ffb2
Add a field to the response object of the REST
endpoint /search/page to display the title of the page
that the given page is a redirect to, or null if
the page is not a redirect.
Bug: T296671
Change-Id: I6673d50e8eae822455972403c82ec33e6ffce5dd
This reverts commit 0d41717c4b.
Reason for revert: the test fails when using Apache in CI instead
of the php built-in webserver.
Bug: T298514
Change-Id: Id47b469eb2698a80167665bba0b66a0b5d9308cd
The assertion made in the second it() statement depends on what happens
in the previous one, so combine these into a single test.
Bug: T298735
Change-Id: I120971bf747797de18ab0fdf71c16b7f520488a5
* Replace `substr`/`substring` with `slice`. The second argument
to `substring` is length, not end index as in `substr`/`slice`,
so convert where necessary.
* Replace `new Date().getTime()` with `Date.now()`
* Documentation fixes
* Replace `throw Error` with `throw new Error`
Change-Id: I532500ea4c99d8ebec01efb21273c8df21626e59
The library now adds 'diff-side-added' and 'diff-side-deleted'.
Bug: T292676
Depends-On: If4bc60c35403799de4e330103d8aaa6f039d96fe
Change-Id: Id92aee4029f008402d9d331876c81fe2263580a7
This change uses $contentLanguage->ucfirst( $name ) to get the
canonical username like this is done in UserNameUtils::getCanonical().
This makes the first character case-insensitive. The toUpperCase() in
JavaScript is not needed anymore.
toUpperCase() in JavaScript and $contentLanguage->ucfirst() in PHP
differ on some characters:
* JavaScript: "ß".toUpperCase() // "SS"
* PHP: $contentLanguage->ucfirst( "ß" ) // "ß"
Bug: T291339
Change-Id: Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a
This does not change any tests, it just adds nested "describes"
structures and improves descriptions.
Change-Id: I3b5628405b97e784b05337ea22b9878dc63ab26d
Make the tags property in each contribution in
the User Contributions REST endpoint an array of tag
objects (instead of a key/value pair mapping tag names
to tag properties).
Bug: T259716
Change-Id: I8265ded81f05fef5f88d5a565266f91a307dd38c
Add a property to the 'tags' object in the /user/{name}/contributions
REST endpoint named 'display' which shows the display
HTML for the tag which is either defined in i18n .json
files or overriden at MediaWiki:tag-$name
Bug: T259716
Depends-On: I57e2a7253944a3fde3f52f52bbf5fe8473c8a415
Change-Id: Id755adcab8b0115e19df2a6046643ebe97881e28
Change the tag property on each contribution from an
array of strings to an array of objects with property
'text'.
Bug: T252202
Bug: T235073
Change-Id: I9ececd1f351600e3e0fd54be2fb34449898285e1
Page titles used in URL paths, such as the Location header returned
after a page was created, must use the correct encoding for spaces and
pluses.
Bug: T258606
Change-Id: I75e91ac8f8da4eb183a9c8f1a682ea08c2225227
Extensions have the ability to inject their own idea of what
a contribution is into the ContribsPager query resultset (via
the ContribsPager__reallyDoQueryHook). Because of this,
stable chronological ordering of ContribsPager results
becomes virtually impossible
For the purpose of the User Contribution REST endpoints, we will
restrict the resultset to ONLY mediawiki revisions for now.
This patch renames 'revisions' to 'contributions' and adds the
'type' field to future-proof work on adding different kinds of
contributions to the User Contribution REST endpoints.
Bug: T257838
Change-Id: I1e6de1c14a5f47e0310df86325fa6d791833addb
Based on the patch that introduces manual revert detection, this is
to create a software-defined change tag that will be applied to all
edits that restore a page to an exact previous state. This is also
for consistency with mw-undo and mw-rollback that will make a
"reverted" tag appear on reverted edits in the future.
Note about the REST API tests: in the next patch in this chain
I encountered even more issues with comparing returned changed tags
with expectations, so I decided it'd better if we just checked the
change tags applied manually in these tests. Otherwise we can run into
nasty race conditions, as the reverted tag is processed after sending
the response to client in the deferred update. It also makes the test
hard to maintain.
Bug: T256001
Change-Id: Ic367886f39faedcb823222b7d63bf4d5cb236ae9
The endpoint for user contributions should include change tags in the
result. Bump the version of npm module api-testing.
Bug: T252202
Change-Id: Iccc0c378bc65d0f34b38557f4c78f424d95a951f