Sometimes we apply tag to a revision even if we
suppress the RecentChange, for example when leaving
redirects after page moves.
Bug: T291967
Change-Id: I7330d3b56cd2280dd23ec0ccb4e1c4807c534739
Feature code that needs the composition API will need this as long as
we're still on Vue 2. This will also help migrate to Vue 3 more
seamlessly, as working around some breaking changes in Vue 3 requires
using the composition API.
Bug: T251974
Change-Id: I8e334ae5f447a8f9b64a7c910b2c1776cef118db
Actually, `->getBody()` returns a stream interface and in order to
get the body's content, just call `->getContent()` which will return
the response's body content in string format.
Change-Id: I9527c8a29c8da2342c8ac958c4e7bb6ba12fd613
implode is documented as taking a string[], not mixed with int or null.
Explicitly cast or remove those instead of the implicit handling by PHP.
Change-Id: I0fac52c861bf85e09571b61a899b7a041aa77914
This causes Title to no longer look up fields in the database
individually, but use LinkCache instead to load an entire row from the
page table at once.
This patch also causes Title to use in-process caching for some
getters that did not use caching before, such as isNewPage()
and getTouched(). These methods do not appear to be used on critical
code paths that involve database updates.
Note that getTouched() used to take an options $db parametr. This
appears to be unused, and has been deprecated in favor of a $flags
parameter, for consistency with other getters on the class.
DEPLOY: Risky! This re-implements the internal caching logic of Title
and slightly modifies caching semantics in some cases. This may have
unforeseen consequences.
Bug: T285389
Depends-On: I103b9e1d2bf594bfc1b0ea12b980dd20bb911c3a
Change-Id: I2df81df7186025e001520f24fd498623c7184772
filedeleteerror-short was repeated as an h2, but the parameters aren't
appropriate for prepareMessage() and filedeleteerror-short-old doesn't
exist. The message is used correctly in the following line.
Change-Id: I07481bd7d43e0596af3de183aa7814572805c8c2
ResponseFactory::createFromException already had support for arbitrary
exceptions, but Router was so far only using it for HttpExceptions,
leaving other kinds of exceptions uncaught.
In addition to catching all exceptions and generating an appropriate
JSON response for them, this patch introduces the ErrorReporter
interface, with an MWErrorReporter implementation which calls
MWExceptionHandler::rollbackMasterChangesAndLog(). This is how uncaught
errors are handled for requests coming in via api.php, so it seems
appropriate to use the same approach for requests coming in via
rest.php.
Bug: T285984
Change-Id: I0605a7693821ef58fac80ab67f51a742556a37fd
The code that was previously in LinkCache::getGoodLinkRow
may return a cached row object (either from the in-process
cache, or memcached). In some cases, this caused
LinkCache::addGoodLinkObjFromRow to throw, because a field
was missing (although the field is missing only from
the cached copy, not from the database).
To avoid this, try to invalidate the cache
in LinkCache::getGoodLinkRow and retry, before
letting the exception propagate.
Bug: T205349
Change-Id: Ie9e90bf32964047c1831f575cc260d7d62e9e848
This marks whether links are being rendered for comments or elsewhere.
This information can be used in hooks; specifically, Wikibase wants to
add labels to entity links only in comments and on special pages.
Bug: T292203
Change-Id: I9164f760e8b46e05218fb36f430bc36ef1fdf30f
Change documentation to null or false where the type is allowed
Also use int on Linker::tocLine, because an int is passed most
Change-Id: I9591ac91586aa9a28f38f80e0ab576b66b303d8d
I set up a local test instance with RedisLockManager, but some things
seemed more complicated than they needed to be. So:
* Add lockManager option to $wgLocalFileRepo, which becomes the
lockManager of the auto-generated file backend.
* Made srvsByBucket be optional. I made the same change to the identical
code in MemcLockManager and DBLockManager, but I didn't test them.
* Improved doc comments for RedisLockManager::__construct() and
$wgLocalFileRepo.
Change-Id: I8ce430b8e849589d4ea87c90a56ee3659da085a0