Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git] / includes / cache / localisation / LocalisationCache.php
index cbff113..e0da22e 100644 (file)
@@ -183,7 +183,6 @@ class LocalisationCache {
        private $mergeableKeys = null;
 
        /**
-        * Constructor.
         * For constructor parameters, see the documentation in DefaultSettings.php
         * for $wgLocalisationCacheConf.
         *
@@ -212,19 +211,17 @@ class LocalisationCache {
                                case 'detect':
                                        if ( !empty( $conf['storeDirectory'] ) ) {
                                                $storeClass = 'LCStoreCDB';
+                                       } elseif ( $wgCacheDirectory ) {
+                                               $storeConf['directory'] = $wgCacheDirectory;
+                                               $storeClass = 'LCStoreCDB';
                                        } else {
-                                               $cacheDir = $wgCacheDirectory ?: wfTempDir();
-                                               if ( $cacheDir ) {
-                                                       $storeConf['directory'] = $cacheDir;
-                                                       $storeClass = 'LCStoreCDB';
-                                               } else {
-                                                       $storeClass = 'LCStoreDB';
-                                               }
+                                               $storeClass = 'LCStoreDB';
                                        }
                                        break;
                                default:
                                        throw new MWException(
-                                               'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' );
+                                               'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.'
+                                       );
                        }
                }
 
@@ -690,7 +687,7 @@ class LocalisationCache {
         * exists, the data array is returned, otherwise false is returned.
         *
         * @param string $code
-        * @param array $deps
+        * @param array &$deps
         * @return array
         */
        protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
@@ -722,7 +719,7 @@ class LocalisationCache {
         * Merge two localisation values, a primary and a fallback, overwriting the
         * primary value in place.
         * @param string $key
-        * @param mixed $value
+        * @param mixed &$value
         * @param mixed $fallbackValue
         */
        protected function mergeItem( $key, &$value, $fallbackValue ) {
@@ -752,7 +749,7 @@ class LocalisationCache {
        }
 
        /**
-        * @param mixed $value
+        * @param mixed &$value
         * @param mixed $fallbackValue
         */
        protected function mergeMagicWords( &$value, $fallbackValue ) {
@@ -778,7 +775,7 @@ class LocalisationCache {
         * otherwise.
         * @param array $codeSequence
         * @param string $key
-        * @param mixed $value
+        * @param mixed &$value
         * @param mixed $fallbackValue
         * @return bool
         */