| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I just find this combination of method calls confusing. A revision
can not be addressed via a LinkTarget. We can only end having a
revision when we started with a proper PageIdentity. This is actually
hard-coded in the RevisionRecord constructor. So why not use that
PageIdentity when we have the guarantee that it's available?
I believe the proposed replacement is also faster. Not only because
we avoid calling some extra code. The new code makes sure that the
page ID is never lost and doesn't need to be queried again.
Change-Id: I3ea3dd8b52566cc9883f3328c7748584fb3d05ff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inject all services into the following API classes
* ApiQueryAllDeletedRevisions
* ApiQueryAllRevisions
* ApiQueryDeletedRevisions
* ApiQueryDeletedrevs
* ApiQueryLogEvents
* ApiQueryRecentChanges
* ApiQueryRevisions
* ApiQuerySiteinfo
* ApiQueryUserContribs
The classes are not extended by extensions.
Change-Id: Iaf3de739f43108976982f5255806e8a1a521dacd
|
|
|
|
|
|
|
| |
Also for all sub-classes
Remove simple doc-blocks without further information
Change-Id: I981934efe32d44f52e5ab865a9b887be5bd0f41e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|/
|
|
|
| |
Bug: T360664
Change-Id: I3363a225e54bb2cae01ba066d432a8b7b21933d2
|
|
|
|
|
| |
Bug: T353458
Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the call to internal constructor of AndExpressionGroup and
OrExpressionGroup by creating a factory function similiar as the
IReadableDatabase::expr function for Expression objects.
This is also a replacement for calls to ISQLPlatform::makeList with
LIST_AND or LIST_OR argument to reduce passing sql as string to the
query builders.
Created two functions to allow the return type to be set for both
expression group to allow further calls of ->and() or ->or() on the
returned object.
Depending on the length of the array argument to makeList() it is
sometimes hard to see if the list gets converted to AND or OR, having
the operator in the function name makes it easier to read, so two
functions are helpful in this case as well.
Bug: T358961
Change-Id: Ica29689cbd0b111b099bb09b20845f85ae4c3376
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a deduplication the raw sql is used as string key in an array.
Now only the search term is part of the key, build the sql a bit later,
as objects not usable in array keys.
The deduplication is needed when namespaces have different first letter
configs as happen with $wgCapitalLinks = false for all namespaces except
the hard coded like user and mediawiki with talk.
Searching for lower case titles splits the query
Bug: T361023
Change-Id: Ia4e29d1d4d816f354318ef443ae19c954fd52274
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* Before this task, when an API parameter specifies allowed user
types, temporary users and permanent users are in the same
category: 'name'.
* However, it is useful to separate them out, and sometimes
allow a permanent user but not a temporary user (e.g.
ApiResetPassword, since temporary users don't have passwords).
* We therefore re-defined the 'name' type only to refer to
permanent (named) users, and add a new 'temp' type.
* This fixes params that currently intend to allow temp users,
and that use 'name' to do so, by adding 'temp'.
What:
* Based on a search for `UserDef::PARAM_ALLOWED_USER_TYPES`,
add the 'temp' type where necessary.
* The following were not updated, because they shouldn't apply
to temporary users:
- owners for includes/api/ApiQueryWatchlist.php,
includes/api/ApiQueryWatchlistRaw.php
- users for includes/api/ApiResetPassword.php,
includes/api/ApiUserrights.php,
includes/api/ApiValidatePassword.php
Bug: T350701
Change-Id: If5ccf1d469327791acff74d013343307e411cca9
|
|
|
|
|
|
|
| |
One of the big ones, so doing this alone.
Bug: T166010
Change-Id: Ibe103cd362535d3cb94cb8931e95fc74099d1497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly used find-and-replace:
Find:
/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|)
Replace with:
\3 \1 \4
Followed by some manual review to make sure I'm not changing too much,
omitting some changes that looked too complicated and anything that
caused test failures, and some whitespace fixes.
Change-Id: Ie78be1c614985d7c2964156e454cc9266515dc18
|
|
|
|
|
|
|
|
|
| |
Easier to translate
There is no visible change for example on
Special:ApiHelp/query+watchlist
Bug: T285545
Change-Id: I536fa3e07a951f3ff98870678ffdbc294a3c7bc0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For pst on parse/compare/editstash/(all)revisions/(all)deletedrevisions
Do not show the IP when IP masking is enabled,
instead show a previous aquired temp name or a placeholder on preview.
MediaWiki itself used this for the ajax preview on GUI's action=edit
Cannot acquire a new unsaved temp user as api parse does not persist
the global session (each request results in a new id)
and it would require a db write on a read request.
Bug: T331397
Change-Id: I74bb4d655f371bd99e3b618d1a0ac45d730c746c
|
|
|
|
| |
Change-Id: I820a2d388922653a6a5b9048b0feaafbb4297d91
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T324906
Change-Id: I1fcb7bd9d84754793c07ac9e39e50c38b364e4c1
|
|/
|
|
| |
Change-Id: Ide6de0a53661e6f650099d7b1f274a02699441df
|
|
|
|
|
| |
Bug: T321265
Change-Id: Ib46bc3e643938f56e0c58a3c5f5e093327e00964
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
30+ API modules had nearly identical code to split and validate
the value of the 'continue' parameter.
Introduce the ApiBase::parseContinueParamOrDie() method and use it to
replace most usages of ApiBase::dieContinueUsageIf(). A few remain in
modules with more complex continuation handling.
Inline most single-use variables that remained after validation was
moved into the new method.
Change-Id: I66bd59ecd4ad16e2039e90f7d66cfa276e6c1c2a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See ec79aa394312d62b598ad29601e2c80eaaf0dd19 about the new method.
These changes all follow the same simple patterns. More complex cases
are handled in I6231b6beae13474d4986929367a9adc6bb76b0db.
This commit was created by running the following terrible Ruby script
I devised: https://phabricator.wikimedia.org/P34833, then manually
reviewing the results: checking that the output makes sense in general,
that the affected variables are not used elsewhere in the file, and
that no comparison conditions have been lost. A few incorrect changes
were undone or corrected.
Change-Id: I8ed363bd6b80a9481d44434a526f078cce20220f
|
|
|
|
|
|
| |
Remove dead code and fix typos. Should cause no change in behavior.
Change-Id: I5d293b842bc93a28b8bcd799a31b5e6e30fe692e
|
|
|
|
| |
Change-Id: I34ffcb70efbfa257da8dab6e0790aa0d697caf5b
|
|
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|
|
|
|
| |
Bug: T287158
Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
|
|
|
|
|
| |
Bug: T287156
Change-Id: I5709441318abc210b3d3beb0be6f2bcbe45ddd36
|
|
|
|
|
|
|
|
|
|
|
| |
All classes extending ApiQueryRevisionsBase, for searching:
ApiQueryAllRevisions, ApiQueryAllDeletedRevisions
ApiQueryRevisions, ApiQueryDeletedRevisions
Including services for the ApiQueryRevisionsBase class
Bug: T259960
Change-Id: I001a9d39355becacab2e34a00027d04ddf7602b5
|
|
|
|
|
| |
Bug: T278917
Change-Id: Ib6bdb727d58a1732448a2034732269f2f125be7e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replaces calls directly to PermissionManager with calls to
the Authority object available from Context or the
GroupPermissionLookup service.
This patch does not address use of PermissionManager for
blocks.
Deprecations:
- ApiBase::checkUserRightsAny deprecated passing optional
User parameter
- ApiBase::checkTitleUserPermissions deprecated passing
LinkTarget as first parameter, takes PageIdentity instead
Bug: T271462
Bug: T271854
Change-Id: I5d7cac1c28a37e074750c46cda03283980a07fca
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For Sqlite and MySQL, renaming name_title_timestamp to
ar_name_title_timestamp so it follows the database convention.
For Postgres:
- Rename archive_name_title_timestamp to ar_name_title_timestamp
- Drop archive_actor (that has only ar_actor)
- Add ar_actor_timestamp (that has ar_actor, ar_timestamp)
This fixes drifts of PG and MySQL and makes work for abstracting the
table easier.
Bug: T230428
Bug: T164898
Change-Id: I123a4c47602bdd415f0fe5823f96159dcd0d84b8
|
|
|
|
| |
Change-Id: I2bc140576efc891bb9b6e50e44041d5bb022ac8f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This brings significant modularization to the Action API's parameter
validation, and allows the Action API and MW REST API to share
validation code.
Note there are several changes in this patch that may affect other code;
see the entries in RELEASE-NOTES-1.35 for details.
Bug: T142080
Bug: T232672
Bug: T21195
Bug: T34675
Bug: T154774
Change-Id: I1462edc1701278760fa695308007006868b249fc
Depends-On: I10011be060fe6d27c7527312ad41218786b3f40d
|
|
|
|
| |
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When converting a Title object into a string for user or user talk
namespace the gender information are needed.
This patch set improves performance on wikis with gender distinction
like dewiki or ruwiki by combining the fetch of the information into one
query and avoids a query per unique user name.
It also avoids false results for request with apihighlimit, because the
apihighlimit with 5000 is higher than the query max limit of the
GenderCache with 1000
Bug: T200238
Change-Id: Ibe0561b210dbeb654117dad777e839640f51b4e4
|
|
|
|
|
|
|
|
| |
Effectively removes the 'deletedhistory' requirement, as this API does
not expose more information than the public toolforge database replica.
Bug: T232389
Change-Id: I84dc138aa310b601423161d1140891d47f8c64d8
|
|
|
|
| |
Change-Id: Ieb6230231d9b916fd1366e7b473db00c87ac4428
|
|
|
|
|
| |
Bug: T220191
Change-Id: I197b8fadaa93e7b320fc19c10e3e09387fe09ad2
|
|
|
|
|
|
|
|
| |
Covers root includes, actions, api, block, changes,
changetags, diff and PermissionManager itself.
Bug: T220191
Change-Id: Ic027d32f5dd8f4c74865df0c8a9fcf91123c889c
|
|
|
|
|
|
|
|
|
| |
Field ar_text_id is being removed as part of MCR schema changes.
Remove references to this field. These references were already
unnecessary due to commit 07842be3.
Bug: T198341
Change-Id: I3dbf12abf3f67fa0ea07c535e830c9d40b46fdc3
|
|
|
|
| |
Change-Id: I2fef157ceec772f304c0923a1cd8c0eef2e82a0f
|
|
|
|
|
|
|
| |
The ANSI SQL default join type is INNER and this might save
some line breaks here and there.
Change-Id: Ibd39976f46ca3f9b71190d3b60b76ca085787a00
|
|
|
|
|
| |
Bug: T216969
Change-Id: I4c06716c83b69d128f26fa7f68736808aa2d3d64
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T209525
Change-Id: I7624d86bbff675eab7fee97adf3b7e2e6753f81d
|
|/
|
|
|
| |
Bug: T194163
Change-Id: Ieb6cc60cacf9dd0d86641b1be817249cdce42112
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During development a lot of classes were placed in MediaWiki\Storage\.
The precedent set would mean that every class relating to something
stored in a database table, plus all related value classes and such,
would go into that namespace.
Let's put them into MediaWiki\Revision\ instead. Then future classes
related to the 'page' table can go into MediaWiki\Page\, future classes
related to the 'user' table can go into MediaWiki\User\, and so on.
Note I didn't move DerivedPageDataUpdater, PageUpdateException,
PageUpdater, or RevisionSlotsUpdate in this patch. If these are kept
long-term, they probably belong in MediaWiki\Page\ or MediaWiki\Edit\
instead.
Bug: T204158
Change-Id: I16bea8927566a3c73c07e4f4afb3537e05aa04a5
|
|
|
|
|
|
|
|
|
| |
Added spaces around .
Removed empty return statement which are not required
Removed return after phpunit markTestIncomplete,
which is throwing to exit the test, no need for a return
Change-Id: I2c80b965ee52ba09949e70ea9e7adfc58a1d89ce
|