From a0c6c01137a707aab58622dbfc0dba76661386da Mon Sep 17 00:00:00 2001 From: Clark Tomlinson Date: Thu, 30 Apr 2015 13:02:27 -0400 Subject: fix references to legacy encryption app name --- apps/files_trashbin/lib/helper.php | 2 +- apps/files_trashbin/lib/trashbin.php | 2 +- apps/files_trashbin/tests/trashbin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'apps') diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php index bc9ebd6ee02..5d244d7b39c 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/helper.php @@ -115,7 +115,7 @@ 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')) { + if (\OCP\App::isEnabled('encryption')) { $entry['isPreviewAvailable'] = false; } $files[] = $entry; diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 31d77c01c91..35cb50097e0 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -476,7 +476,7 @@ class Trashbin { */ private static function deleteEncryptionKeys(\OC\Files\View $view, $file, $filename, $timestamp, $user) { $size = 0; - if (\OCP\App::isEnabled('files_encryption')) { + if (\OCP\App::isEnabled('encryption')) { $keyfiles = \OC\Files\Filesystem::normalizePath('files_trashbin/keys/' . $filename); diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php index 85c47b527b7..12f2900d983 100644 --- a/apps/files_trashbin/tests/trashbin.php +++ b/apps/files_trashbin/tests/trashbin.php @@ -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); -- cgit v1.2.3 From d557519746c251e732855b0e6e5e4ea3ae4a7377 Mon Sep 17 00:00:00 2001 From: Clark Tomlinson Date: Thu, 7 May 2015 11:31:34 -0400 Subject: removing deletion of encryption keys this will be handled in the wrapper now --- apps/files_trashbin/lib/trashbin.php | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'apps') diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 35cb50097e0..688eaa1f2cb 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -425,7 +425,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)); @@ -467,31 +466,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('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 * -- cgit v1.2.3 From 7d2666699bc37a8f45035e82712143818ed0ab65 Mon Sep 17 00:00:00 2001 From: Clark Tomlinson Date: Thu, 7 May 2015 11:41:02 -0400 Subject: removing encryption preview check --- apps/files_trashbin/lib/helper.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'apps') diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php index 5d244d7b39c..320ad2eeb8e 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/helper.php @@ -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('encryption')) { - $entry['isPreviewAvailable'] = false; - } $files[] = $entry; } return $files; -- cgit v1.2.3