diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-29 20:27:12 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-29 20:27:12 +0200 |
commit | ee7c4c4c930bc463663f46cea29212e61f0f484b (patch) | |
tree | bb9e3ec613f526a10f8e38cf27ea1be2bc337e5c /apps/files_encryption/ajax/adminrecovery.php | |
parent | 5dd865a57f5e769afb612428e739caff0ba1ea65 (diff) | |
download | nextcloud-server-ee7c4c4c930bc463663f46cea29212e61f0f484b.tar.gz nextcloud-server-ee7c4c4c930bc463663f46cea29212e61f0f484b.zip |
changed l10n to full sentences
Diffstat (limited to 'apps/files_encryption/ajax/adminrecovery.php')
-rw-r--r-- | apps/files_encryption/ajax/adminrecovery.php | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/apps/files_encryption/ajax/adminrecovery.php b/apps/files_encryption/ajax/adminrecovery.php index 915909515e7..afc9ca984d9 100644 --- a/apps/files_encryption/ajax/adminrecovery.php +++ b/apps/files_encryption/ajax/adminrecovery.php @@ -16,7 +16,6 @@ use OCA\Encryption; $l = OC_L10N::get('files_encryption'); $return = false; -$action = ''; // Enable recoveryAdmin $recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId'); @@ -24,7 +23,18 @@ $recoveryKeyId = OC_Appconfig::getValue('files_encryption', 'recoveryKeyId'); if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === "1") { $return = \OCA\Encryption\Helper::adminEnableRecovery($recoveryKeyId, $_POST['recoveryPassword']); - $action = $l->t('enable'); + + // Return success or failure + if ($return) { + \OCP\JSON::success(array("data" => array("message" => $l->t('Recovery key successfully enabled')))); + } else { + \OCP\JSON::error(array( + "data" => array( + "message" => $l->t( + 'Could not enable recovery key. Please check your recovery key password!') + ) + )); + } // Disable recoveryAdmin } elseif ( @@ -32,17 +42,18 @@ if (isset($_POST['adminEnableRecovery']) && $_POST['adminEnableRecovery'] === "1 && "0" === $_POST['adminEnableRecovery'] ) { $return = \OCA\Encryption\Helper::adminDisableRecovery($_POST['recoveryPassword']); - $action = $l->t('disable'); -} -// Return success or failure -if ($return) { - \OCP\JSON::success(array("data" => array("message" => $l->t('Recovery key successfully %sd', array($action))))); -} else { - \OCP\JSON::error(array( - "data" => array( - "message" => $l->t( - 'Could not %s recovery key. Please check your recovery key password!', array($action)) - ) - )); + // Return success or failure + if ($return) { + \OCP\JSON::success(array("data" => array("message" => $l->t('Recovery key successfully disabled')))); + } else { + \OCP\JSON::error(array( + "data" => array( + "message" => $l->t( + 'Could not disable recovery key. Please check your recovery key password!') + ) + )); + } } + + |