summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/ajax/getMigrationStatus.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/ajax/getMigrationStatus.php')
-rw-r--r--apps/files_encryption/ajax/getMigrationStatus.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php
index 17469a1af0c..7c9e0dcc51c 100644
--- a/apps/files_encryption/ajax/getMigrationStatus.php
+++ b/apps/files_encryption/ajax/getMigrationStatus.php
@@ -13,16 +13,14 @@ use OCA\Encryption\Util;
$loginname = isset($_POST['user']) ? $_POST['user'] : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
-$migrationCompleted = true;
+$migrationStatus = Util::MIGRATION_COMPLETED;
if ($loginname !== '' && $password !== '') {
$username = \OCP\User::checkPassword($loginname, $password);
if ($username) {
$util = new Util(new \OC_FilesystemView('/'), $username);
- if ($util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
- $migrationCompleted = false;
- }
+ $migrationStatus = $util->getMigrationStatus();
}
}
-\OCP\JSON::success(array('data' => array('migrationCompleted' => $migrationCompleted)));
+\OCP\JSON::success(array('data' => array('migrationStatus' => $migrationStatus)));