Commit graph

6 commits

Author SHA1 Message Date
Thiemo Mättig
3450e826e3 Don't return PHPUnit_Framework_MockObject_MockObject when not needed
The callers of this method don't need to know about this additional
interface.

Change-Id: I9e5531e495b7f5c890e8e520d661ccd5b0a644e1
2016-03-11 15:28:46 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Kunal Mehta
49d762c2f7 Remove unused global declaration
Change-Id: I4239cee1410c40d3ffd4a19f409a91a945a72d60
2014-12-05 21:39:48 +00:00
Kunal Mehta
27d21e3117 Move core message dirs from $wgMessagesDirs to LocalisationCache::getMessagesDirs()
If $wgMessagesDirs is initially empty, we can optimize when batch loading
extensions:

    if ( !$wgMessagesDirs ) {
        $wgMessagesDirs = $cache['MessagesDirs'];
    }

With APC, this should be O(1) CPU time.

This was suggested by Tim in the code review of I7074b65d07c5.

Change-Id: I66fa907cdaafe18b74b5b9afaa8b6b1db069bea3
2014-12-03 14:32:18 -08:00
umherirrender
a51674e204 Use mergeMwGlobalArrayValue in LocalisationCacheTest
Change-Id: I8cfe494d159101306c699169dd224c3bea65c753
2014-10-23 17:42:36 +00:00
Brad Jorsch
b6fc9067b0 LocalisationCache: Process one fallback at a time
Currently LocalisationCache merges the core data for all languages in
the fallback chain, then the extension data, then merges those two, and
then gives extensions like LocalisationUpdate a chance to make final
overrides with the LocalisationCacheRecache hook.

But if LocalisationUpdate doesn't want to locally duplicate all the
messages for every language (e.g. r104041), LocalisationCacheRecache is
too late: the information as to whether a message came from the primary
language or a fallback has been lost, so when LU itself has an override
for a fallback language it can't know whether or not the existing
message should be overridden or not.

The solution is for LocalisationCache to gather the data for each
fallback language separately, call a new hook for LU to affect just that
language (LocalisationCacheRecacheFallback), and only then merge the
fallback languages together.

Bug: 68781
Change-Id: Iacfe96063fcc66c1f97ca5e5292a8fc70af988cf
2014-09-04 16:56:31 +02:00