dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git]
/
includes
/
cache
/
localisation
/
LocalisationCache.php
diff --git
a/includes/cache/localisation/LocalisationCache.php
b/includes/cache/localisation/LocalisationCache.php
index
4b6362f
..
e0da22e
100644
(file)
--- a/
includes/cache/localisation/LocalisationCache.php
+++ b/
includes/cache/localisation/LocalisationCache.php
@@
-183,7
+183,6
@@
class LocalisationCache {
private $mergeableKeys = null;
/**
private $mergeableKeys = null;
/**
- * Constructor.
* For constructor parameters, see the documentation in DefaultSettings.php
* for $wgLocalisationCacheConf.
*
* For constructor parameters, see the documentation in DefaultSettings.php
* for $wgLocalisationCacheConf.
*
@@
-212,23
+211,21
@@
class LocalisationCache {
case 'detect':
if ( !empty( $conf['storeDirectory'] ) ) {
$storeClass = 'LCStoreCDB';
case 'detect':
if ( !empty( $conf['storeDirectory'] ) ) {
$storeClass = 'LCStoreCDB';
+ } elseif ( $wgCacheDirectory ) {
+ $storeConf['directory'] = $wgCacheDirectory;
+ $storeClass = 'LCStoreCDB';
} else {
} else {
- $cacheDir = $wgCacheDirectory ?: wfTempDir();
- if ( $cacheDir ) {
- $storeConf['directory'] = $cacheDir;
- $storeClass = 'LCStoreCDB';
- } else {
- $storeClass = 'LCStoreDB';
- }
+ $storeClass = 'LCStoreDB';
}
break;
default:
throw new MWException(
}
break;
default:
throw new MWException(
- 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' );
+ 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.'
+ );
}
}
}
}
- wfDebugLog( 'caches',
get_class( $this )
. ": using store $storeClass" );
+ wfDebugLog( 'caches',
static::class
. ": using store $storeClass" );
if ( !empty( $conf['storeDirectory'] ) ) {
$storeConf['directory'] = $conf['storeDirectory'];
}
if ( !empty( $conf['storeDirectory'] ) ) {
$storeConf['directory'] = $conf['storeDirectory'];
}
@@
-313,7
+310,7
@@
class LocalisationCache {
* array.
* @param string $code
* @param string $key
* array.
* @param string $code
* @param string $key
- * @return bool|null|string
+ * @return bool|null|string
|string[]
*/
public function getSubitemList( $code, $key ) {
if ( in_array( $key, self::$splitKeys ) ) {
*/
public function getSubitemList( $code, $key ) {
if ( in_array( $key, self::$splitKeys ) ) {
@@
-690,7
+687,7
@@
class LocalisationCache {
* exists, the data array is returned, otherwise false is returned.
*
* @param string $code
* 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 ) {
* @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
* 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 ) {
* @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 ) {
* @param mixed $fallbackValue
*/
protected function mergeMagicWords( &$value, $fallbackValue ) {
@@
-778,7
+775,7
@@
class LocalisationCache {
* otherwise.
* @param array $codeSequence
* @param string $key
* otherwise.
* @param array $codeSequence
* @param string $key
- * @param mixed $value
+ * @param mixed
&
$value
* @param mixed $fallbackValue
* @return bool
*/
* @param mixed $fallbackValue
* @return bool
*/