diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-10-07 12:52:01 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-10-07 12:52:01 +0200 |
commit | b060123155d82d59c981b89600a3a1b2c9f37bc9 (patch) | |
tree | b853aeaeac696dc1f7eabdcd412c7ef5b1ea68c5 /apps/files_encryption/ajax | |
parent | 794d3ef949b487011805d50e851e5a07ad7776d4 (diff) | |
download | nextcloud-server-b060123155d82d59c981b89600a3a1b2c9f37bc9.tar.gz nextcloud-server-b060123155d82d59c981b89600a3a1b2c9f37bc9.zip |
improved visual feedback if user enabled recovery key
Diffstat (limited to 'apps/files_encryption/ajax')
-rw-r--r-- | apps/files_encryption/ajax/userrecovery.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_encryption/ajax/userrecovery.php b/apps/files_encryption/ajax/userrecovery.php index 0f3b973d69a..a5b89fa7233 100644 --- a/apps/files_encryption/ajax/userrecovery.php +++ b/apps/files_encryption/ajax/userrecovery.php @@ -13,6 +13,8 @@ use OCA\Encryption; \OCP\JSON::checkAppEnabled('files_encryption'); \OCP\JSON::callCheck(); +$l = \OC::$server->getL10N('files_encryption'); + if ( isset($_POST['userEnableRecovery']) && (0 == $_POST['userEnableRecovery'] || '1' === $_POST['userEnableRecovery']) @@ -38,4 +40,8 @@ if ( } // Return success or failure -($return) ? \OCP\JSON::success() : \OCP\JSON::error(); +if ($return) { + \OCP\JSON::success(array('data' => array('message' => $l->t('File recovery settings updated')))); +} else { + \OCP\JSON::error(array('data' => array('message' => $l->t('Could not update file recovery')))); +} |