| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Removes usage of various deprecated SpecialEmailUser classes.
Bug: T362636
Change-Id: Ieb71a3741348ca9dae8c5bf32e891fee458ed5b2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
If a qualified field name is used, the table part must either refer to
an alias or the output of tableName().
Change-Id: I59839a3d0061b471b65c4e33c78e6ea92c1d2906
|
| |
| |
| |
| | |
Change-Id: I0c57684b30365b9e5e3f2346bd342122c9d45309
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: T353458
Change-Id: I99d728bd111ff882220cd175ff09d4da20b81eae
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
When nothing is used from actor, do not add it to the query
Change-Id: I7b0095befd4403395a0bf7c0958adbbefa229020
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This skips ones that have been marked but were never in the then
RELEASE-NOTES and later HISTORY file, and so weren't properly
deprecated ever.
Change-Id: I31df2d7e83182b5bf9524237fc4a1862356bfd5a
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- We want to make sure that the top-level redirect fires for temporary
accounts which were created in an edit attempt, but did not yet save
an edit
What:
- In EditPage and ApiEditPage, perform the redirect if there is a saved
temp user as part of the current process, or if the user account is a
temporary one and it has no edits. Note that this means the top-level
redirect would be performed if a temp user creates a first edit on a
non-home wiki:
- logged out user makes a failed attempt on wiki A, temp account is
created
- same user makes a successful edit on wiki A, redirect hook fires
- same user visits wiki B and makes a succesful edit, redirect hook
fires
Note:
- We could consider setting a query parameter like
`createdinrequest=1` to signal to TempUserCreatedRedirect
implementations that the temporary account was created in the current
request, and did not exist earlier. But I am not sure if we have a use
case for needing that, so have left it out of this patch.
Bug: T359405
Change-Id: If4b8c561383f993606c0ba565591871195a1f8c2
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
$this->mParams['file'] and $this->mParams['chunk'] are set to instance
of \Wikimedia\ParamValidator\Util\UploadedFile in the validation step.
Use ApiMain::getUpload
Fix ApiUploadTestCase to set error key to OK,
the null gets converted to UPLOAD_ERR_NO_FILE in
\Wikimedia\ParamValidator\Util\UploadedFile::getError
and breaking the test.
Change-Id: If57307a3f8278fd3fa25732231595bf148935679
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Remove 2 uses of unnecessary temporary variables
* Update code order for imagelimits to be more standardised
Change-Id: I4bcaa272e18ab326e66784a0a0e6baf10e08d02a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also removing a test from WatchedItemQueryServiceUnitTest. These tests
have been written extremely poorly and have caused issue many times over
the years not allowing us to do any refactors. There are still pretty
good integration tests in place.
Bug: T361023
Change-Id: I400294fbbe70ac98508f254a4ed72be14e018975
|
| | |
| | |
| | |
| | | |
Change-Id: Ie8c672d34451df3dd141ebce9f3cd6f3339042b4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
* Modules that extend ApiQueryBase are loaded using the ApiQuery
module. This defines an override to the ApiBase::isWriteMode
method that loads the modules.
* Using the mModule when $isError is true could lead to the
exception that was thrown in ::executeAction being thrown again.
* Therefore, ApiMain::sendCacheHeaders should only call the
ApiBase::isWriteMode method if the request did not fail
with an error that caused $isError to be true.
* Without this fix, ApiUsageExceptions appear in logstash as
exceptions, as described in T363133.
What:
* Only interact with $this->mModule if the $isError argument
is false. If $isError is true, assume that ::isWriteMode
would return true. Assuming this will also avoid error
responses being marked as fresh for any amount of time, as
the error may be temporary.
* Add a test that verifies that the method does not throw if
ApiBase::isWriteMode throws an ApiUsageException.
Bug: T363133
Change-Id: I41d869c257878b8a94d6c40332e2028405de8729
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Replace BETWEEN with >= and <= operator
Change-Id: Ic21b6f4cc11c773c967d9d4c5f20e762c2ff9629
|
| |_|/
|/| |
| | |
| | | |
Change-Id: Ic5cdf47ff6dcfc05a903a3dfb4d87d04c956bb89
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix the real issues found by this sniff, and convert the remaining
false positive ignores to per-line ignores so that any more real issues
won't be added.
Change-Id: I18e75d59df327e2d93a3a487c115e92b9f268722
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of globally ignoring this sniff, convert the current violations
(which set the variable so can't be fixed easily yet) to use local phpcs
comments to silence the errors.
Change-Id: I490cbf4915e2705383edb4a2fc5ddc1efd55c960
|
| | |
| | |
| | |
| | | |
Change-Id: Ie61eccca7d801fd832b615f3ca7c6dbe6aabeedc
|
|/ /
| |
| |
| | |
Change-Id: I7859191740d66d00595c4bdeea12b227ac25bcc5
|
| |
| |
| |
| | |
Change-Id: I8f82724197d20f9289d80e138d80310f1eab29f2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Action API action=userrights is using the special page to lookup the
user and since c87c8f64 this returns a UserIdentityValue instead of
UserRightsProxy for cross-wiki changes
But the getId() call was not updated to use the same wikiid to get the
id. This results in an assertion error. Before that change api was
returning the foreign user id (via UserRightsProxy), so it should remain
to do that.
Bug: T362740
Change-Id: If0cd239e8603d5b577184f0122cb74a28dafdab8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch uses the recommended MW practice for injecting
settings into MW services. Instead of passing in the full
config object, pass in service options which MW service wiring
will use to lookup settings/options from config sources.
So in this patch, the various options have been identified
and put into `CONSTRUCTOR_OPTIONS` constant and inject via
service wiring.
Test plan
=========
Ensure that the special page: `Special:Search` still works
with this patch checkout on your local test wiki.
When you visit `Special:Search` on your local wiki, you should
see a search form view. Type in something like: "Main Page" and
then hit search. If everything works well, then local test passes.
NOTE
====
This patch also resolves a TODO which mentions the removal of
the `getConfig()` method from the SearchEngineConfig class.
Change-Id: Ib5dfc10f3f210c6c35247f4f30f9549dd60e0af7
|
| |
| |
| |
| | |
Change-Id: Id9b705a44efaa35442d3dd72258c15530c4d1cc0
|
| |
| |
| |
| | |
Change-Id: I308f15e4c38d6e89ccd7c1fd0f95c42e5a89825b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The $httpCode is passed to Exception::__construct and type-hinted as
integer since php8.2
When a module requires POST, but is used with GET a deprecation notice
is shown in php8.2
validatepassword: Passing null to parameter #2 ($code) of type int is
deprecated
Bug: T362272
Change-Id: Ib5c6a24abf0808a0557c57170279b325b4bddcea
|
|\ \ \
| | | |
| | | |
| | | | |
parse time"
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This ensures uniform treatment of all places that call `addCategory`
without duplicating the `defaultsort` code; it also ensures that the
effect of the {{DEFAULTSORT}} parser function is independent of page
position.
Bug: T40435
Bug: T353530
Change-Id: I4480a6d59e766fa4eddc9ec9117c58b66771bb47
|
| |/
|/|
| |
| |
| |
| |
| | |
These methods can already handle any MessageSpecifier, but their
documentation didn't show this.
Change-Id: I1323d18baf17a8a27cc9bed31860c4cc89e61a22
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
* ApiQueryBase subclasses may define a ::isWriteMode override, as
the API call may need to write to the DB.
** This is the case for the CheckUser extension, where the
'checkuser' API creates a log entry that allows users to audit
usage of the API.
* ApiQuery currently does not define a implementation of
::isWriteMode, which means that the definitions by any class
that extends ApiQueryBase currently do nothing.
* ApiQuery::isWriteMode should be defined and work in a similar
way to ApiQuery::isReadMode, so that subclasses of ApiQueryBase
can have their definitions of ::isWriteMode respected.
What:
* Define ApiQuery::isWriteMode in a similar way to how ApiQuery
::isReadMode is written, but also inspecting the modules that
are used through the 'list' and 'prop' params.
* Add tests for ApiQuery::isWriteMode.
Bug: T361951
Change-Id: Idf1c8f95df58a861404e0c89507c885ec4554793
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PHP 8.2 makes krsort() use the stricter numeric comparison semantics[1]
introduced in PHP 8.0 when it is comparing a numeric key with a
non-numeric key. This changes result ordering in ApiResult for arrays
that contain a mix of numeric and non-numeric keys.
Make the ordering consistent across PHP versions by using an
user-defined comparison function instead that always considers a
non-numeric string to be smaller or equal in a comparison of a
non-numeric and a numeric string.
[1] https://wiki.php.net/rfc/string_to_number_comparison
Bug: T326480
Change-Id: I91d55a1d516e4f0ec31f00a719c6616c73b7f786
|
| |
| |
| |
| | |
Change-Id: Ib8f03d481f8888325c6aa245c7ef2b2af90c076f
|
| |
| |
| |
| | |
Change-Id: Ifefb091d860ff63c39f24e2bd491b1afc1ddb735
|
| |
| |
| |
| | |
Change-Id: I0f9358936e25b52c391d6552fc822df683178fe0
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| | |
User "0", page "0" and edit summary "0" are all valid.
Treating them as empty may cause subtle inconsistencies.
Change-Id: I90a92bfb972cca840e5d8060dac3f116a22990db
|
| |
| |
| |
| | |
Change-Id: I1a9293e1a6f8cc121a0d55a973ca05b6785dc038
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With this change, when async uploads are enabled, upload-by-url
will spawn a job and a form with a button to check the status of the
process is shown to the user.
In the process, add processing of warnings in the remote jobs spawned by
the API or the Special page. This is done by adding checks to
UploadJobTrait::verifyUpload. In order to manage warnings serialized in
the job status, a method to unserialize the result of
UploadBase::makeWarningsSerializable.
Things that we might want to fix:
* The form's UI is abysmal, we should probably use Codex
* While it's not a huge deal, I'd like to figure out why I need to
purge the page cache if I want the file to show up. And more
interestingly, why this doesn't happen when uploading via the API
Bug: T295007
Bug: T118887
Change-Id: I49181d93901f064815808380285fc4abae755341
|
| | |
| | |
| | |
| | | |
Change-Id: I6b06aba12ed9a3b14ab72e74a7da8387ac2f0770
|
| | |
| | |
| | |
| | | |
Change-Id: I5670330cfac9b57b5a0d0a40a5cfa744998c8f12
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To this end if 'async' is passed with 'url' to the api:
* Avoid downloading the file synchronously, but verify early
if the upload is allowed by adding a canFetchFile to UploadBase
overridden in UploadFromUrl
* Spawn an UploadFromUrlJob
* When checking for the status of the job, do it fetching the data in
the main stash.
Bug: T295007
Change-Id: If95ccf376cfa9fbe9b3cd058e8e334a6bdd2eb44
|