The following User methods, deprecated in 1.37, have been removed:
- ::resetIdByNameCache,
- ::getStubThreshold,
- ::matchEditTokenNoSuffix,
- ::changeableByGroup
- ::changeableGroups,
- ::isAllowUsertalk
ActorStore::clearCaches() has been removed, since User::resetIdByNameCache
has been removed. User::$mAllowUsertalk has been removed, since
User::isAllowUsertalk has been removed.
Bug: T277511
Change-Id: I608a5277924fc50cc3d9fca6ba958bc6d9c321d0
We moved the ToC insertion from the parser to ParserOutput::getText()
in T287767 but forgot to ensure that the ToC contents are properly
language converted -- this happens *after* the call to
ParserOutput::setTOCHTML() in the old Parser code.
This is a quick and dirty fix, which does the language conversion
but probably misses a few corner cases of the original behavior
(marked by XXX comment). For example, it doesn't disable language
conversion on interface messages -- but there shouldn't be any
ToC on interface messages. Not heeding __NOCONTENTCONVERT__
in the article is a legit problem, but probably not as bad as
the UBN regression we're fixing. We'll clean this up in
a followup (T295209), but it will involve passing some additional
information from the Parser to ParserOutput which won't be
present in "old" parser cache entries anyway.
This is an UBN and this patch is the quickest way to ensure that
existing parser cache content renders correctly. It's
preferable to the alternative
(Iffcff96fd9b4749794ac78414c1801979a652792) which handles all the
corner cases but can't fix up existing parser cache content,
which has "always" been stored without language conversion.
Bug: T295187
Change-Id: Ic14b3a49a8ee7ed600485d4f8a363a206035a847
The restrictions were introduced in r53480 (724411c7ca, 2009),
which makes it clear that this was just about HTML correctness,
and in HTML5 there are fewer requirements.
This code was last touched in commit fd6e9ef2d4 (2017), where it was
suggested in code review that it "can probably be removed":
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/362326/comment/6e71af52_900abad4/
Bug: T126962
Change-Id: I54c1f28ec9112cd4a161a79e76c2224f91f134b9
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