These four endpoints have been experimental for many months:
/coredev/v0/me/contributions
/coredev/v0/user/{user}/contributions
/coredev/v0/me/contributions/count
/coredev/v0/user/{user}/contributions/count
Analytics data shows they are not receiving any traffic.
Remove to clear out the coreDevelopmentRoutes.json file for
unrelated experiments, and to reduce future code maintenance.
Bug: T305506
Change-Id: I21cf9a398638d34725a3c34d348fbad50df40153
The new trait provides conveniance methods for logging and throwing
errors based on StatusValue instances.
Change-Id: Id7cbacb744bee79cd8a6f61291a26b36e6243053
The TranslationAliasesDirs configuration allows defining translatable
aliases in JSON files. The value should be a name or names of folders
that contains files that have localized aliases. Each language should
have a separate file.
Currently, it supports defining special page aliases but in the
future can be extended to support magic words and namespace aliases.
The patch adds a script: ConvertExtensionsMessagesToTranslationAlias
that can be used to convert existing ExtensionMessagesFiles to the new
format.
Bug: T89947
Change-Id: Ief16a48a8dc8742854f67301791aa2a0b0531116
This reverts commit cb09a27cc2.
The class is not very useful as it is now, due to performance issues
(T169027#9342985). The Graph extension is not going to use iframes
(T334940#9537862) and that was the only concrete feature for this, so
making the class usable in practice is unlikely to get prioritized.
No point in leaving the code in its current halfway state.
Bug: T222807
Bug: T169027
Change-Id: Id1b5193975435b58aebc225528e30f04456d0c41
To this end, we create a trait to coalesce together all upload methods
common to all upload mechanisms.
Change-Id: I28d0be0239f3b25efc6ea8bc3d400b9d0f5bc7bf
Follows-up Iadea44b7867f48a2be6ccbf00c0e56911a5af74e.
ResourceLoaderEntryPoint:
* Rename from Resource to ResourceLoader, as it is the entry point
for ResourceLoader.
* Fix accidental use of ingroup on the file docblock
instead of the class.
https://phabricator.wikimedia.org/F42046908
* Fix broken "see" reference to "/load.php" on the ResourceEntryPoint
class on doc.wikimedia.org. Files are indexed in Doxygen by full
name without leading slash.
* Remove load.php from docgroup, akin to index.php.
tests:
* Remove unrelated Rest namespace from test suite.
* Remove redundant default values in newResourceLoader(),
especially null values were confusing by showing an
apparent intent to set a value without actually
isplacing the default, given that isset/?? treat
set null as not set.
* Simplify test by using the built-in startup module instead.
EntryPoint:
* Remove comment in test about doPostOutputShutdown.
It sounded like it was explaining that we use getCapturedOutput()
instead of run() because the latter calls doPostOutputShutdown
which we want to avoid. Except, we don't avoid it,
since run() is called and does call doPostOutputShutdown.
Unclear what it was explaining.
* Improve docs around getCapturedOutput() in the base class,
and make explicit that this seemingly unused complexity
exists for the purpose of testing.
Bug: T354216
Change-Id: I5139fda90a3d5ac7ea1ed917c8045d1a09961d78
This replaces the old pass-by-reference $predicates array and makes the
intent clearer. It also supports lazy-loading of predicated properties,
which useful for avoiding expensive computations like SHA-1 hashes when
they end up not being needed.
Pass FileOp::doPrecheck() a mutable "batch level" FileStatePredicates
instance along with an immutable "operation level" FileStatePredicates
instance. The later can be used in callbacks that need to recall the
predicated file states just before the start of the operation.
Make FileOp::precheckDestExistence() support lazy size/sha1 closures.
Bug: T348294
Change-Id: I709c1920d2bee4b76f69e38c1643a44a73d63265
Add SpecialPrefixIndexGetFormFiltersHook hook that allow extensions
to add custom filters on Special:PrefixIndex and another hook
SpecialPrefixIndexQuery that allows you to modify the query builder
to add more conditions based on the filters selected.
Bug: T299308
Change-Id: Iabc672086547d0b19f01cc95892633c2668821ef
* Constructor without injected services.
* Class name alias RandomPage.
The class name SpecialRandomPage can removed in 1.43.
Accoding to
https://codesearch.wmcloud.org/search/?q=RandomPage
there is no usage with the old class names or without injected
services.
Bug: T265308
Depends-On: I889266c7b1435c6849a63fa5d99f272c9650e96a
Change-Id: I9ae2655084128ff5e9531f4d4431cab966c72341
- A pager allows to limit the result shown on the page
- A pager allows pagination if the list is very long
- Add timestamp, thumb and dimensions to provide more information
Bug: T335629
Change-Id: I30b6cbe11f116baad4f61a08876f18f5d042ac02
This class belongs with the rest of the Parsoid output stash code.
This class has been marked @unstable since 1.39 and thus the move
does not need release notes.
Change-Id: I16061c0c28b1549fbe90ea082cc717fee4a09a6e
The idea is that all entry points should share the code in the
MediaWikiEntryPoint base class. This change by itself doesn't achieve much, it should be followed up by a change moving request handling logic from ResourceLoader into ResourceEntryPoint.
Bug: T354216
Change-Id: Iadea44b7867f48a2be6ccbf00c0e56911a5af74e
The goal is to unify the high level control flow in entry points by
making them use a shared base class. Eventually, this will allow
us to test all aspects of request handling, including response
headers and output buffer handling. That will however require
us to move quite a bit of logic from ApiMain into ApiEntryPoint.
Bug: T354216
Change-Id: I4ea1cbb8b2786c24deade7d5029d95fe0c2abc57
1) Introduce EntryPointEnvironment which wraps functions that interact
with the PHP runtime, so they can be mocked for testing.
2) Allow server info fields to be overwritten in FauxRequest.
3) Make MediaWikiEntryPoint use WebResponse to set headers
Bug: T354216
Change-Id: Ic21950c956de5d2b5a7dd66a1e2de58f807cfd9f
The idea is that all formatters that need the user language or
other request specific context should be instantiated by
FormatterFactory.
Change-Id: I8334cc89dcf0f293298b82e004116be50a90f0d1
Why:
* The user_is_temp column exists in the user table to allow finding
temporary users when reading from the DB directly.
* This column was added in f283c0e990,
but this was not written to until
6e68107b3a which was several months
later and after a release version was branched.
* As such, we need a maintenance script to populate the user_is_temp
column for wikis that have enabled temporary account creation.
What:
* Add a maintenance script named populateUserIsTemp.php which
populates the user_is_temp column by looking for rows in the
user table that have user_is_temp as 0 and have user_name match
at least one temporary account match pattern. These rows are then
updated to have user_is_temp as 1.
* This script will be added to update.php in a future commit, so that
betawikis can have this run manually.
* Create unit tests and an integration test for this maintenance
script.
Bug: T355181
Change-Id: I6223496d7aee65e3ab207fe86e386b01bef8b388
Move it to the StringUtils class, and make it throw a dedicated
exception. Update code in media/ to use the new method. Those seemed to
be the only usages across all known MW code [1], so hard-deprecate the
method as well.
[1] - https://codesearch.wmcloud.org/search/?q=wfUnpack&files=&excludeFiles=&repos=
Change-Id: I82ce96b6373443cf57a48b98595ca05290f37349
Introduce LockFileChecker that used to check whether
composer-installed dependencies (no-dev) are up-to-date.
Bug: T283389
Change-Id: I0d56f235604d5c856bae5d170230f8c7ca0729c6