diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-04-12 00:58:14 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-04-12 00:58:14 +0200 |
commit | 2180a4c4205466e34888f689bdbf1c7624c3ad87 (patch) | |
tree | 808db6252ab57f38afa9714e8a881ba9722afcf4 | |
parent | 6cf36b4f8160a0bf758e3d3b588581c14f9425ac (diff) | |
download | nextcloud-server-2180a4c4205466e34888f689bdbf1c7624c3ad87.tar.gz nextcloud-server-2180a4c4205466e34888f689bdbf1c7624c3ad87.zip |
-L10N: cache the result of findLanguage
-rw-r--r-- | lib/l10n.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/l10n.php b/lib/l10n.php index 1e07a9b9557..315e326b292 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -298,10 +298,16 @@ class OC_L10N{ $temp = explode(';', $i); $temp[0] = str_replace('-', '_', $temp[0]); if( ($key = array_search($temp[0], $available)) !== false) { + if (is_null($app)) { + self::$language = $available[$key]; + } return $available[$key]; } foreach($available as $l) { if ( $temp[0] == substr($l, 0, 2) ) { + if (is_null($app)) { + self::$language = $l; + } return $l; } } |