summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-02 18:01:51 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-03 16:47:31 +0100
commited4c05c7b5e61d00722238f25154ad475fd632bb (patch)
tree7389f2c5b321b3666f78579eef2d622a20b938d6
parent5fc004f8ead3a8b2cdf40768ba69f906d998af16 (diff)
downloadnextcloud-server-ed4c05c7b5e61d00722238f25154ad475fd632bb.tar.gz
nextcloud-server-ed4c05c7b5e61d00722238f25154ad475fd632bb.zip
Use findLanguage() instead of creating the object first
-rw-r--r--lib/private/util.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 3a0d7f653ed..4c60af88189 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -396,8 +396,7 @@ class OC_Util {
*/
public static function addTranslations($application, $languageCode = null) {
if (is_null($languageCode)) {
- $l = new \OC_L10N($application);
- $languageCode = $l->getLanguageCode($application);
+ $languageCode = \OC_L10N::findLanguage($application);
}
if (!empty($application)) {
$path = "$application/l10n/$languageCode";