Merge pull request #19478 from owncloud/cache-found-l10n-per-app

cache found l10n per app and not globally
This commit is contained in:
Robin Appelman 2015-09-30 19:08:42 +02:00
commit be8ad69d35
1 changed files with 4 additions and 3 deletions

View File

@ -503,8 +503,9 @@ class OC_L10N implements \OCP\IL10N {
* @return array an array of available languages * @return array an array of available languages
*/ */
public static function findAvailableLanguages($app=null) { public static function findAvailableLanguages($app=null) {
if(!empty(self::$availableLanguages)) { // also works with null as key
return self::$availableLanguages; if(isset(self::$availableLanguages[$app]) && !empty(self::$availableLanguages[$app])) {
return self::$availableLanguages[$app];
} }
$available=array('en');//english is always available $available=array('en');//english is always available
$dir = self::findI18nDir($app); $dir = self::findI18nDir($app);
@ -518,7 +519,7 @@ class OC_L10N implements \OCP\IL10N {
} }
} }
self::$availableLanguages = $available; self::$availableLanguages[$app] = $available;
return $available; return $available;
} }