| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Bug: T326274
Change-Id: I90493d7cd4c21fdc022bcc19765fc04d986a9c8f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the dictionary, "per" (or more conventionally "as per")
means "according to". Refer OED "per" sense II.3.a. For example:
"No value was passed, so return null, as per default".
In this sentence, we are not specifying the default, we are referring
to the default. This correct usage of "per default" was used nowhere
in MediaWiki core as far as I can see.
Instead we have "per default" being used to mean "by default", that is,
giving the value to use when no explicit value was specified.
In OED, the phrase "by default" is blessed with its own section just
for computing usage:
"P.1.e. Computing. As an option or setting adopted automatically by a
computer program whenever an alternative is not specified by the user
or programmer. Cf. sense I.7a."
There are highly similar pre-computing usages of the same phrase,
whereas the phrase "per default" is not mentioned.
As a matter of style, I think "per default" should not be used even
when it is strictly correct, since the common incorrect usage makes it
ambiguous and misleading.
Change-Id: Ibcccc65ead864d082677b472b34ff32ff41c60ae
|
|
|
|
| |
Change-Id: I8f82724197d20f9289d80e138d80310f1eab29f2
|
|
|
|
|
|
|
|
|
| |
This was added in 300fcfd00bba76f9f770f1f053a1903d5876ad56
for an experimental REST endpoint that was removed in
c3fe4b037d9ad7e5fd158f3e686f717c75a0fd20, and is now unused.
Bug: T305506
Change-Id: I900c00747f77af6b0844105e9681c9d4acfe1ad5
|
|
|
|
| |
Change-Id: I3632ce1ae00527f806652deb96cafb473aed3dcf
|
|
|
|
|
|
|
| |
Fixed SkinModuleTest::provideGetFeatureFilePathsOrder as nesting of
arrays for parameters is wrong
Change-Id: I9875008adf62d284c48662ebfbd245d72e5be064
|
|
|
|
|
|
| |
Improve SelectQueryBuilder doc issues found in the process.
Change-Id: I1934eebc79c3aea0c03ca3fc949bffbf5860187f
|
|
|
|
|
| |
Bug: T354015
Change-Id: Id3945dafa021e840b5ee791433c372322ae57f77
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also remove the fallback index and options as it was agreed upon in the
ticket as its needlessly complicates the function and is only used in
SqlBlobStore which can have its own copy of the function
Bug: T354194
Change-Id: I38b179c9bfeb7d2c3e92fa4845dce19558f45a0f
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is inconsistent with the access pattern of other constants in
MediaWiki. it's also confusing (e.g. it's unclear to a newcomer why
UserFactory is implementing IDBAccessObject) and it's prone to clashes
(e.g. BagOStuff class has a clashing constant).
It has been already announced: https://w.wiki/9DAX
Bug: T354194
Change-Id: Ic2357634b8385d65b55db2b557191419b06c40e0
|
|\ \
| |/
|/|
| | |
::setRawText()"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ParserOutput::getText() is not a simple getter, but does
transformations on the "text" of the ParserOutput; the simple getter
is named ::getRawText().
To maintain consistency, rename ParserOutput::setText() to
::setRawText() and the property name ParserOutput::$mText to
::$mRawText so future readers are not confused.
The JSON property name as it appears in the serialized ParserCache
is left as 'Text' so that we don't have any forward- or backward-
rollback issues.
Change-Id: I3ef34814ab9473cc70d0a6806e8c5a4a02b73491
|
|/
|
|
|
| |
Bug: T353458
Change-Id: I088cbc53fbcdb974e5b05b45a62e91709dacc024
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the render ID for each parse stored into cache so that we are able
to identify a specific parse when there are dependencies (for example
in an edit based on that parse). This is recorded as a property added
to the ParserOutput, not the parent CacheTime interface. Even though
the render ID is /related/ to the CacheTime interface, CacheTime is
also used directly as a parser cache key, and the UUID should not be
part of the lookup key.
In general we are trying to move the location where these cache
properties are set as early as possible, so we check at each location
to ensure we don't overwrite a previously-set value. Eventually we
can convert most of these checks into assertions that the cache
properties have already been set (T350538). The primary location for
setting cache properties is the ContentRenderer.
Moved setting the revision timestamp into ContentRenderer as well, as
it was set along the same code paths. An extra parameter was added to
ContentRenderer::getParserOutput() to support this.
Added merge code to ParserOutput::mergeInternalMetaDataFrom() which
should ensure that cache time, revision, timestamp, and render id are
all set properly when multiple slots are combined together in MCR.
In order to ensure the render ID is set on all codepaths we needed to
plumb the GlobalIdGenerator service into ContentRenderer, ParserCache,
ParserCacheFactory, and RevisionOutputCache. Eventually (T350538) it
should only be necessary in the ContentRenderer.
Bug: T350538
Bug: T349868
Followup-To: Ic9b7cc0fcf365e772b7d080d76a065e3fd585f80
Change-Id: I72c5e6f86b7f081ab5ce7a56f5365d2f75067a78
|
|
|
|
|
| |
Bug: T227047
Change-Id: Ie877b578b5760d3592afd7654df524fe4d20a6ff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* Following T345578, the ActorStore throws an error on
attempting to create an actor whose name is their IP address
if temporary accounts are enabled.
* For the specific case of importing old revisions, we need to
be able to create new actors whose name is their IP address,
while still generally disallowing it.
What:
* Add $allowCreateIpActors flag to ActorStore, and check for
it during actor name validation.
* Set the flag from ActorStoreFactory::getActorStore depending
on whether temporary users are enabled.
* Add ActorStoreFactory::getActorStoreForImport, which sets
flag to true.
* Add RevisionStoreFactory::getRevisionStoreForImport, which
uses getActorStoreForImport. Use this from classes handling
imports, so that IP actors can always be created.
* Add $forImport flag on ActorMigration, since RevisionStore
uses an actor store obtained via ActorMigration.
Bug: T354207
Change-Id: I0715bd0d23089fd8156e579913e6e823089809be
|
|
|
|
|
| |
Bug: T328220
Change-Id: I4e0454ce3ad3741756e2010a76e548d6c9a6bcb5
|
|
|
|
|
|
|
|
|
|
| |
Found via (?<!IDBAccessObject)::READ_
We are planning to deprecate and remove implementing IDBAccessObject
interface just to use the constants.
Bug: T354194
Change-Id: I89d442fa493b8e5332ce118e5bf13f13b8dd3477
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
And general clean up of db connection handling in core
Bug: T354194
Change-Id: Icb3685f1d7f8d1f4bcadf8e292ddf9450180fcdb
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In detail:
* Add type declarations everywhere.
* Remove redundant PHPDoc tags.
* Avoid possibly expensive in_array() scans when an isset() can do
the same job.
* Replace some indirect $this->isDefinedRole() calls with more direct
isset(). This is not done for performance but for readability. I
find it really confusing to see an `if ( $this->isDefinedRole() )`
followed by code that accesses $this->instantiators[…]. How is this
related? How does the method call guarantee the array element is
there? Why not just check if the array element is there? Which is
what happens now.
Change-Id: Ifeaed847b89b756b7be4430d769f94132d2d9e49
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is no actor migration left for which a temp table is needed.
Bug: T215466
Change-Id: I4e85b0a8e05323263a44454691ef3e6963aad3ab
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| | |
Bug: T328220
Change-Id: Ic45438d9e6bbf127f1415add81ab902044765840
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Instead of calling self::READ_* on these constants, just directly call
it.
Since these classes are public and might be relied on directly in other
places, we can't remove the "implements IDBAccessObject" yet but we will
start doing that soon.
Bug: T354194
Change-Id: I3e26b9fc7f93efdfc55a1790a7cdfa5c0d562303
|
|
|
|
|
|
|
| |
Most used non-namespaced class!
Bug: T353458
Change-Id: I4c2cbb0a808b3881a4d6ca489eee5d8c8ebf26cf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* VE needs to be given HTML for the main slot since that is the only
editing that is supported right now. This is a quickish hack to fix
the problem and breakage caused by c8d0470f. When T351113 is addressed,
these hacks will be removed.
* But Parsoid read-view API users will now only get the main slot output
for these pages. But since this is only an issue on Commons and
Parsoid read views there will be worked on much later (T351113),
we have time to figure out the changes needed to address this properly.
* Updated existing tests.
Bug: T351026
Bug: T351113
Change-Id: Id79098e2969bd207f819e3c9e89c8122f7182a2e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Done via
'([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$3->expr\( '$1', '$2', $4 \)
And
'([A-Za-z_\.]+) IS NULL OR ([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$4->expr( '$1', '=', null )->or\( '$2', '$3', $5 \)
Bug: T210206
Change-Id: I109bf2a712bdefa9e074f775b1bee41ac5b9d665
|
|
|
|
|
|
|
|
| |
To deprecate ::modifyDisplayQuery() and unblock a lot of migrations to
SelectQueryBuilder.
Bug: T344971
Change-Id: Icb9265644bdbc0b30e2a419ae0103f0e78fe90bd
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T345777
Change-Id: I12c00c9a5d547ddaa459fdd1489dd82b91fc3fe2
|
| |
| |
| |
| |
| |
| |
| |
| | |
I fixed some edge cases in the script that migrates to SQB and it
managed to fix these now.
Bug: T344971
Change-Id: I00cc9a6660d9bd4c64c976121b2121ccd7aae1f0
|
| |
| |
| |
| |
| |
| |
| | |
One of the big ones, so doing this alone.
Bug: T166010
Change-Id: Ibe103cd362535d3cb94cb8931e95fc74099d1497
|
|/
|
|
|
|
|
|
|
|
| |
They're under 'specials' because that's where they're mostly used,
but they're just another kind of Pager (shown by their use outwith
the MediaWiki\Specials hierarchy, which is a bad code smell for us
to review later).
Bug: T166010
Change-Id: Iad3f91582b723c1e6679525aa852ffdfd8c6d5ba
|
|
|
|
| |
Change-Id: I57c25d953700ca1cd97cc71ec2a28cbeb9ee875f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
delete()
The design principle for SelectQueryBuilder was to make the chained
builder calls look as much like SQL as possible, so that developers
could leverage their knowledge of SQL to understand what the query
builder is doing.
That's why SelectQueryBuilder::select() takes a list of fields, and by
the same principle, it makes sense for UpdateQueryBuilder::update() to
take a table. However with "insert" and "delete", the SQL designers
chose to add prepositions "into" and "from", and I think it makes sense
to follow that here.
In terms of natural language, we update a table, but we don't delete a
table, or insert a table. We delete rows from a table, or insert rows
into a table. The table is not the object of the verb.
So, add insertInto() as an alias for insert(), and add deleteFrom() as
an alias for delete(). Use the new methods in MW core callers where
PHPStorm knows the type.
Change-Id: Idb327a54a57a0fb2288ea067472c1e9727016000
|
|
|
|
|
|
|
| |
Similar to RevisionSQB (Ifd690dc8f030)
Bug: T344971
Change-Id: Ic520bcf09f4cc95ebd6a3990cff46dec5b7cd350
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A unique index on ar_rev_id was added in T193180 (2019), allowing
revisions of deleted pages to be reliably looked up by just their ID.
Use the improved getArchivedRevisionRecord() method in a few places
that previously had to use manual queries.
Bug: T251066
Change-Id: I9352f64952ac4b803d76e9e72f88a01be7317c56
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I22090062274dceec96d43e23eb227a7e3b1e36fa
|
|/
|
|
|
|
|
|
|
| |
Deprecating RevisionStore::getQueryInfo() and cleaning up a lot of code
Also removing a brittle test that wasn't really testing anything.
Bug: T344971
Change-Id: Ifd690dc8f030f86e3567a717eaeb830cb6dc703b
|
|
|
|
| |
Change-Id: I1a4224eac8bad47f7228faf68ea7f9c7d44a44ad
|
|
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
|
|
| |
Done automatically based on a php parser written on top of ANTLR4
Bug: T335377
Change-Id: Ie8fabc594edab18e55cb1d5bbf573762106e3d71
|
|
|
|
|
|
|
| |
Done semi-automatically via a parser written on top of ANTLR4
Bug: T311866
Change-Id: Ib71d6810e480d7176726082347b569e346557de7
|