Merge pull request #15985 from owncloud/hotfix/fix-encryption-references
[enc2] fix references to legacy encryption app name
This commit is contained in:
commit
9366dde875
4 changed files with 2 additions and 31 deletions
|
@ -115,9 +115,6 @@ class Helper
|
|||
$entry['id'] = $id++;
|
||||
$entry['etag'] = $entry['mtime']; // add fake etag, it is only needed to identify the preview image
|
||||
$entry['permissions'] = \OCP\Constants::PERMISSION_READ;
|
||||
if (\OCP\App::isEnabled('files_encryption')) {
|
||||
$entry['isPreviewAvailable'] = false;
|
||||
}
|
||||
$files[] = $entry;
|
||||
}
|
||||
return $files;
|
||||
|
|
|
@ -479,7 +479,6 @@ class Trashbin {
|
|||
}
|
||||
|
||||
$size += self::deleteVersions($view, $file, $filename, $timestamp, $user);
|
||||
$size += self::deleteEncryptionKeys($view, $file, $filename, $timestamp, $user);
|
||||
|
||||
if ($view->is_dir('/files_trashbin/files/' . $file)) {
|
||||
$size += self::calculateSize(new \OC\Files\View('/' . $user . '/files_trashbin/files/' . $file));
|
||||
|
@ -521,31 +520,6 @@ class Trashbin {
|
|||
return $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \OC\Files\View $view
|
||||
* @param $file
|
||||
* @param $filename
|
||||
* @param $timestamp
|
||||
* @return int
|
||||
*/
|
||||
private static function deleteEncryptionKeys(\OC\Files\View $view, $file, $filename, $timestamp, $user) {
|
||||
$size = 0;
|
||||
if (\OCP\App::isEnabled('files_encryption')) {
|
||||
|
||||
$keyfiles = \OC\Files\Filesystem::normalizePath('files_trashbin/keys/' . $filename);
|
||||
|
||||
if ($timestamp) {
|
||||
$keyfiles .= '.d' . $timestamp;
|
||||
}
|
||||
if ($view->is_dir($keyfiles)) {
|
||||
$size += self::calculateSize(new \OC\Files\View('/' . $user . '/' . $keyfiles));
|
||||
$view->deleteAll($keyfiles);
|
||||
|
||||
}
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* check to see whether a file exists in trashbin
|
||||
*
|
||||
|
|
|
@ -67,7 +67,7 @@ class Test_Trashbin extends \Test\TestCase {
|
|||
$application->setupPropagation();
|
||||
|
||||
//disable encryption
|
||||
\OC_App::disable('files_encryption');
|
||||
\OC_App::disable('encryption');
|
||||
|
||||
//configure trashbin
|
||||
self::$rememberRetentionObligation = \OC_Config::getValue('trashbin_retention_obligation', Files_Trashbin\Trashbin::DEFAULT_RETENTION_OBLIGATION);
|
||||
|
|
|
@ -78,7 +78,7 @@ class ResetPassword extends Command {
|
|||
/** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
|
||||
$dialog = $this->getHelperSet()->get('dialog');
|
||||
|
||||
if (\OCP\App::isEnabled('files_encryption')) {
|
||||
if (\OCP\App::isEnabled('encryption')) {
|
||||
$output->writeln(
|
||||
'<error>Warning: Resetting the password when using encryption will result in data loss!</error>'
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue