Merge pull request #21260 from owncloud/fix-undefined-l10n-var

initialize l10n instance earlier, fixes an undefined var warning foll…
This commit is contained in:
Thomas Müller 2015-12-17 16:08:08 +01:00
commit d402ac91d7
1 changed files with 1 additions and 3 deletions

View File

@ -55,10 +55,10 @@ class Controller {
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
$l = new \OC_L10n('settings');
if (isset($_POST['username'])) {
$username = $_POST['username'];
} else {
$l = new \OC_L10n('settings');
\OC_JSON::error(array('data' => array('message' => $l->t('No user supplied')) ));
exit();
}
@ -78,7 +78,6 @@ class Controller {
} elseif ($isUserAccessible) {
$userstatus = 'subadmin';
} else {
$l = new \OC_L10n('settings');
\OC_JSON::error(array('data' => array('message' => $l->t('Authentication error')) ));
exit();
}
@ -122,7 +121,6 @@ class Controller {
$validRecoveryPassword = $keyManager->checkRecoveryPassword($recoveryPassword);
$recoveryEnabledForUser = $recovery->isRecoveryEnabledForUser($username);
}
$l = new \OC_L10n('settings');
if ($recoveryEnabledForUser && $recoveryPassword === '') {
\OC_JSON::error(array('data' => array(