diff options
author | Robin Appelman <robin@icewind.nl> | 2015-09-30 19:08:42 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2015-09-30 19:08:42 +0200 |
commit | be8ad69d3511f6037d33d58caa3557987522ab05 (patch) | |
tree | 79a150a44196a14fd0bcd1effb5f43f165a6fa91 /lib | |
parent | 4c5b0316ba8ce95721ad60bc19bd5a516cc842c5 (diff) | |
parent | 5a2b30d78f1a5cb1879a453a9ac43cd5fa1de90c (diff) | |
download | nextcloud-server-be8ad69d3511f6037d33d58caa3557987522ab05.tar.gz nextcloud-server-be8ad69d3511f6037d33d58caa3557987522ab05.zip |
Merge pull request #19478 from owncloud/cache-found-l10n-per-app
cache found l10n per app and not globally
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/l10n.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 168011cfcec..ad02ba88526 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -503,8 +503,9 @@ class OC_L10N implements \OCP\IL10N { * @return array an array of available languages */ public static function findAvailableLanguages($app=null) { - if(!empty(self::$availableLanguages)) { - return self::$availableLanguages; + // also works with null as key + if(isset(self::$availableLanguages[$app]) && !empty(self::$availableLanguages[$app])) { + return self::$availableLanguages[$app]; } $available=array('en');//english is always available $dir = self::findI18nDir($app); @@ -518,7 +519,7 @@ class OC_L10N implements \OCP\IL10N { } } - self::$availableLanguages = $available; + self::$availableLanguages[$app] = $available; return $available; } |