aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-30 22:11:19 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-30 22:11:19 +0100
commit261cd87efa5623b51bbfa466f94d243bb7b49336 (patch)
tree25dd1d72e0a1e7563dc4bb6deabc937afd7946ec /apps/files_encryption/lib
parent0e92a4896df11d6fd3ee4ed73dfa1cb121d66895 (diff)
parentc1730d241c52b5e5c1719b6086d05cb30783e665 (diff)
downloadnextcloud-server-261cd87efa5623b51bbfa466f94d243bb7b49336.tar.gz
nextcloud-server-261cd87efa5623b51bbfa466f94d243bb7b49336.zip
Merge branch 'master' into home-storage
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/util.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 0d34af043a1..5e855abd973 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -205,7 +205,7 @@ class Util {
$this->userId,
'server-side',
0,
- 0
+ self::MIGRATION_OPEN
);
$query = \OCP\DB::prepare($sql);
$query->execute($args);
@@ -1285,6 +1285,17 @@ class Util {
// If no record is found
if (empty($migrationStatus)) {
\OCP\Util::writeLog('Encryption library', "Could not get migration status for " . $this->userId . ", no record found", \OCP\Util::ERROR);
+ // insert missing entry in DB with status open
+ $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`,`migration_status`) VALUES (?,?,?,?)';
+ $args = array(
+ $this->userId,
+ 'server-side',
+ 0,
+ self::MIGRATION_OPEN
+ );
+ $query = \OCP\DB::prepare($sql);
+ $query->execute($args);
+
return self::MIGRATION_OPEN;
// If a record is found
} else {