diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-27 09:37:00 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-27 09:37:00 +0100 |
commit | 1594371c8c0124af2469bd70b9b917bfd845ae19 (patch) | |
tree | a7fb0546707e05984fa78f45a53563514b9c9d4d /settings | |
parent | 5b7a1b13f3514f60650e1da41d8dc046ee0252c5 (diff) | |
parent | 3a6390031cb7e6575edd8d4a5271614eb8ba9470 (diff) | |
download | nextcloud-server-1594371c8c0124af2469bd70b9b917bfd845ae19.tar.gz nextcloud-server-1594371c8c0124af2469bd70b9b917bfd845ae19.zip |
Merge pull request #21741 from owncloud/l10n-improvements
Move methods to the factory that are not related to translating, but to guessing/finding the language
Diffstat (limited to 'settings')
-rw-r--r-- | settings/ajax/setlanguage.php | 2 | ||||
-rw-r--r-- | settings/personal.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index 760d2ca5d7d..537a5afe958 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -31,7 +31,7 @@ OCP\JSON::callCheck(); // Get data if( isset( $_POST['lang'] ) ) { - $languageCodes=OC_L10N::findAvailableLanguages(); + $languageCodes = \OC::$server->getL10NFactory()->findAvailableLanguages(); $lang = (string)$_POST['lang']; if(array_search($lang, $languageCodes) or $lang === 'en') { \OC::$server->getConfig()->setUserValue( OC_User::getUser(), 'core', 'lang', $lang ); diff --git a/settings/personal.php b/settings/personal.php index 11b4f762a36..261a459a921 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -63,7 +63,7 @@ $user = OC::$server->getUserManager()->get(OC_User::getUser()); $email = $user->getEMailAddress(); $userLang=$config->getUserValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() ); -$languageCodes=OC_L10N::findAvailableLanguages(); +$languageCodes = \OC::$server->getL10NFactory()->findAvailableLanguages(); // array of common languages $commonLangCodes = array( |