| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I2998ad3ccc5a54eccfe36ad09fe509e83dfb719c
|
|
|
|
|
| |
Bug: T353458
Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: T360664
Change-Id: I3363a225e54bb2cae01ba066d432a8b7b21933d2
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
|
|
|
|
| |
Change-Id: I453ce3148a46fcb9cc5c685cee92274e0cb4f98a
|
|
|
|
|
|
| |
When nothing is used from actor, do not add it to the query
Change-Id: I7b0095befd4403395a0bf7c0958adbbefa229020
|
|
|
|
| |
Change-Id: I7859191740d66d00595c4bdeea12b227ac25bcc5
|
|
|
|
|
|
|
| |
Mixing different binary boolean operators within an expression
without using parentheses to clarify precedence is not allowed (T358966)
Change-Id: I24ca752d5dac7c948fdbcabf721f6f0aef8a466f
|
|
|
|
|
|
|
|
|
|
|
|
| |
Temporary accounts are now distinct from users or anonymous.
Add a flag to reflect that to:
- ApiQueryImageInfo
- ApiQueryLogEvents
- ApiQueryRecentChanges
- ApiQueryRevisionsBase
Bug: T351636
Change-Id: I7986dea5ccd0dc942bf133040c4ac715487f29b9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Also while we are here, migrate buildComparison() calls with one field
only to expr()
Bug: T210206
Change-Id: I2ac7adbe4fb26af3383a38106e9a36381148c828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
For list=recentchanges the revid is already included with rcprop=ids
Change-Id: I8ee2eed3bf67f8430df63d9e52346b0749418c2e
|
|
|
|
|
|
|
|
|
|
| |
so that extensions (i.e. CheckUser) can implement their own comment
store without having a lot of code duplication
basically the comment store version of I3a6486532f2ef36
Bug: T233004
Change-Id: Ib40f99e00a514d41776ce521baf113e46d37e9cd
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T324906
Change-Id: I1fcb7bd9d84754793c07ac9e39e50c38b364e4c1
|
|/
|
|
|
|
|
| |
Use the new function in conditions to avoid creating substrings or to
search the whole string
Change-Id: Ibad6b1b447a4f62cceb34359231f88ebb967a90b
|
|
|
|
|
| |
Bug: T321265
Change-Id: Ib46bc3e643938f56e0c58a3c5f5e093327e00964
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| | |
It is only useful to use local titles for various api parameters
Change-Id: Ife2a951e6b48b59e2b77d455c8343f79f1163b0a
|
| |
| |
| |
| |
| |
| |
| | |
Change to use Authority object where possible
to use the interface instead of implementation
Change-Id: Ia7e9ce2a2f05ef2ae1cf981bf96faf48b04cf58d
|
| |
| |
| |
| | |
Change-Id: I498a315b8b4b56d5e2f939e797adbe0487cd7d07
|
| |
| |
| |
| | |
Change-Id: I34ffcb70efbfa257da8dab6e0790aa0d697caf5b
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A outer join does not filter the result, when no column is used from the
joined table the optimizer just put it away (not part of explain result)
That could be done in the code as well to make the query easier to read
and understand
Bug: T298845
Change-Id: Ibb02b6918f9659122b7235a46ca6cdd69ce26eb8
|
|/
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about conditional variable declaration
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T259172
Change-Id: I1f200ac37df7448453688bf464a8250c97313e5d
|
|
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about null types by setting null_casts_as_any_type to
false (the default in mediawiki-phan-config)
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T242536
Bug: T301991
Change-Id: I0f295382b96fb3be8037a01c10487d9d591e7e01
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These special pages and their counter-part APIs are:
- Special:RecentChanges
- Special:Watchlist
- Special:Log
- Special:Contributions
This also changes the way MAX_EXECUTION_TIME works from taking the value
as milliseconds, it takes seconds which is more intuitive for users.
Bug: T297708
Depends-On: I126e7181422d8da1a63afc3717faa4f72a687dd9
Change-Id: I3ff78751c3df3b6342f1865d35c2075f4415185d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CommentParser:
* Move comment formatting backend from Linker to a CommentParser service.
Allow link existence and file existence to be batched.
* Rename $local to $samePage since I think that is clearer.
* Rename $title to $selfLinkTarget since it was unclear what the title
was used for.
* Rename the "autocomment" concept to "section link" in public
interfaces, although the old term remains in CSS classes.
* Keep unsafe HTML pass-through in separate "unsafe" methods, for easier
static analysis and code review.
CommentFormatter:
* Add CommentFormatter and RowCommentFormatter services as a usable
frontend for comment batches, and to replace the Linker static methods.
* Provide fluent and parametric interfaces.
Linker:
* Remove Linker::makeCommentLink() without deprecation -- nothing calls
it and it is obviously an internal helper.
* Soft-deprecate Linker methods formatComment(), formatLinksInComment(),
commentBlock() and revComment().
Caller migration:
* CommentFormatter single: Linker, RollbackAction, ApiComparePages,
ApiParse
* CommentFormatter parametric batch: ImageHistoryPseudoPager
* CommentFormatter fluent batch: ApiQueryFilearchive
* RowCommentFormatter sequential: History feed, BlocklistPager,
ProtectedPagesPager, ApiQueryProtectedTitles
* RowCommentFormatter with index: ChangesFeed, ChangesList,
ApiQueryDeletedrevs, ApiQueryLogEvents, ApiQueryRecentChanges
* RevisionCommentBatch: HistoryPager, ContribsPager
Bug: T285917
Change-Id: Ia3fd50a4a13138ba5003d884962da24746d562d0
|
|
|
|
|
| |
Bug: T259960
Change-Id: I844306512c307e0e1d01f1de2ac1625daa8ed57d
|
|
|
|
|
|
|
| |
It's not an issue anymore and keeping such hard-coded index is harmful
Bug: T270620
Change-Id: I9198c29aa5e773a7521711ce4ef089a208f241ed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
developer's intention
array_fill_keys() was introduced in PHP 5.2.0 and works like
array_flip() except that it does only one thing (copying keys) instead
of two things (copying keys and values). That makes it faster and more
obvious.
When array_flip() calls were paired, I left them as is, because that
pattern is too cute. I couldn't kill something so cute.
Sometimes it was hard to figure out whether the values in array_flip()
result were used. That's the point of this change. If you use
array_fill_keys(), the intention is obvious.
Change-Id: If8d340a8bc816a15afec37e64f00106ae45e10ed
|
|
|
|
|
|
|
|
| |
Otherwise it tries to scan the whole logging table, joining every row on
actor.
Bug: T282122
Change-Id: Ia34897a496656e0d0d26f9e038b1edb0377c461e
|
|
|
|
|
| |
Bug: T278917
Change-Id: I1b78bad7e1fa43f5f82908567a7daad9c6cc79b9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ApiQueryBlocks
- ApiQueryDeletedrevs
- ApiQueryFilearchive
- ApiQueryLogEvents
- ApiQueryProtectedTitles
- ApiQueryRecentChanges
- ApiQueryUserContribs
- ApiQueryWatchlist
Bug: T259960
Change-Id: Ib7ee815fcea3e72523124eb6a2eaf20ad9565cfe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Make ApiQueryBase::addOption() annotation consistent with
SelectQueryBuilder::option() since the ApiQueryBase method
is just a wrapper to it.
Change-Id: Ib301bce787c8ba89ae8333eb7cfb8d7d287de20c
|
|
|
|
|
| |
Bug: T270769
Change-Id: Iecce3634d61f21695e5f7ea71cba65ddae22d82c
|
|
|
|
|
|
| |
Bug: T270769
Follow-Up: I17028bba489d04b01d22c39dc8935a4f0f771c7e
Change-Id: I9d820dbd315fb793ccdb8b5591240328686a8c2e
|
|
|
|
|
|
|
|
|
|
| |
Notably:
* In ApiManageTags, I used a switch instead of a dynamic function name,
so that the call graph will be correct.
* In ApiImageRotate, checkTitleUserPermissions() has always returned
void, this was an error introduced in 4e6810e4a2c1d821d8d108c
Change-Id: Iea22616b8e7e2e0cc804619a54f8690898b2cb82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|