Move core message dirs from $wgMessagesDirs to LocalisationCache::getMessagesDirs()
authorKunal Mehta <legoktm@gmail.com>
Wed, 3 Dec 2014 22:12:52 +0000 (14:12 -0800)
committerKunal Mehta <legoktm@gmail.com>
Wed, 3 Dec 2014 22:32:18 +0000 (14:32 -0800)
commit27d21e31177d4b98947d98976118491818e17383
tree312ec90de1249b2a9c6e90b92f42da6631d9f043
parentefde278c82435c9daf969ec1484731a5c8005ef5
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
includes/DefaultSettings.php
includes/cache/LocalisationCache.php
tests/phpunit/includes/cache/LocalisationCacheTest.php