Should be "string" not "String" and "array" not "Array" in
@param, @return and @var use cases. Also, minor typo fixes.
Change-Id: I9d5ebc5b741c6560907b95f7c0c4039da2861f4a
We are incrementally removing places where the parser is used with
tidy disabled, since future parsers will not support such operation.
Bug: T198214
Change-Id: I0f417f75a49dfea873e9a2f44d81796a48b9f428
Follow up to a3d6c1411d.
This avoids extra queries for messages that have a software defined value.
Bug: T193271
Change-Id: I25aa0e27200a0b417721cf1fbd34a82095405b89
In PHP 7.3, compact() now raises notices if the variable is undefined, which
is something that we expect. So we can check whether the key exists instead
of bothering with compat() and suppressing warnings.
Bug: T206979
Change-Id: I612049db4debd850a2e6d10bc631d31aa17be898
This affects most LCStoreDB which is the default cache
and spamming the log.
Bug: T154424
Bug: T97693
Change-Id: I68af177c7d0d88ab266eb3fefb4336eff86d861c
Prior to I462554b30, MessageCache::replace() did just that: it took the
existing cache and updated the one entry.
In I462554b30, the rearrangement of work into a DeferredUpdate
introduced a bug: the in-process cache was updated, but when the shared
cache was loaded later the entry was never updated in there so the
shared caches kept the old value. This was found in code review and
worked around by reloading all the messages from the database instead of
updating the existing cache.
But all that extra work reloading everything from the database causes
major slowness saving any MediaWiki-namespace page when the wiki has
many such small pages. Let's go back and fix the bug so replace() can
again replace instead of reloading everything.
Bug: T203925
Change-Id: Ife8e1bd6f143f480eb8da09b817c85aadf33a923
When this was originally written, the plan was to read both the old and
new fields during the transition period, while stopping writes to them
midway through. It turns out that the WHERE conditions to do read-both
correctly are generally not handled well by the database and working
around that would require a lot of complicated code (see what's being
removed from ApiQueryUserContribs here, for example).
We can simplify things greatly by instead having it write both fields
during the transition period, reading from the old for the first part
and the new for the second part, as is being done for MCR.
Bug: T204669
Change-Id: I4764c1c7883dc1003cb12729455c8107319f70b1
Depends-On: I845f6ae462f2539ebd35cbb5f2ca8b5714e2c1fb
Depends-On: I88b31b977543fdbdf69f8c1158e77e448df94e11
Clean up individual message cache handling when the master key is
volatile. The goal is not to treat the message as gone but to re-fetch
it when accessed rather than cache the value in the main/process cache.
Bug: T193271
Change-Id: I4bcaf10c1516e7c96c2d0963722affeaf80272e0
In the message store, all messages fall through to English,
but only a few languages should actually explicitly fallback
to English (English variants and dialects).
These new explicit fallbacks are used by ResourceLoaderImageModule,
and this change doesn't affect the message fall through system.
Bug: T203350
Change-Id: I6b68a17f4d69341bccdae748727b5133a600d8bc
...instead of var_export(), which uses array() syntax and spaces for
indentation.
Also get rid of some unnecessary closure indirection.
Bug: T200626
Change-Id: I5db8ade50fcba5ecf394817b2d14295620314ea7
In some functions MediaWikiServices::getInstance() was called twices or
in loops. Extract the variable to reduce calls.
Change-Id: I2705db11d7a9ea73efb9b5a5c40747ab0b3ea36f
This does not set 'db' as the cache type so that admins can still
easily set the cache directory to use the file-based cdb system.
If they do not, then at least the second DB file will be used to
avoid heavy contention.
Bug: T93097
Change-Id: Ib3912f00cf12de99801ebda4f06135b2987ce71a
In PHP 7.3, compact() now emits warnings when a variable doesn't exist.
Because our language files aren't required to contain all the possible
variables, this results in massive spam trying to run tests.
Change-Id: Idab0340ec1cdebfca67cb448e350a408438bcbbc
With I8a47a8500922906bd4e4936b59b657de3bb9abdc Language::equals can
directly and faster compare the objects.
$wgLanguageCode can differ from $wgContLang->getCode() when a deprecated
language code is used. This change prevents this because Language
replaces deprecated language codes in Language::factory().
Change-Id: I07f47eceff8b3a4192278b1e9e1cfd9a41816a1c
Array store (LCStoreStaticArray) should behave as standard LCStoreCDB,
creating the target directory when it doesn't exist.
This fixes unexpected "No such file or directory" errors when
replacing 'files' with 'array' in $wgLocalisationCacheConf['store'].
Change-Id: Ie49cf03ca93ac47fc98665de36e6207bef287193