summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-18 13:26:42 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-18 13:26:42 +0200
commite20bb71a4241227811b2498262bc455006c6c5e1 (patch)
tree6cedd56c290f358849fb5d135364892b8ec8ab10
parent8052d2901dfcfba8e6fb2d37e19275536324ee43 (diff)
downloadnextcloud-server-e20bb71a4241227811b2498262bc455006c6c5e1.tar.gz
nextcloud-server-e20bb71a4241227811b2498262bc455006c6c5e1.zip
remove unused code
-rw-r--r--apps/files_encryption/hooks/hooks.php1
-rw-r--r--apps/files_encryption/js/settings-admin.js2
-rwxr-xr-xapps/files_encryption/lib/keymanager.php2
-rwxr-xr-xapps/files_encryption/tests/util.php10
-rwxr-xr-xapps/files_encryption/tests/webdav.php2
-rw-r--r--apps/files_trashbin/lib/trashbin.php2
6 files changed, 7 insertions, 12 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 6f739947b0c..df101acab9d 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -406,7 +406,6 @@ class Hooks {
// otherwise we perform a stream copy, so we get a new set of keys
$mp1 = $view->getMountPoint('/' . $user . '/files/' . $params['oldpath']);
$mp2 = $view->getMountPoint('/' . $user . '/files/' . $params['newpath']);
- list($storage1, ) = Filesystem::resolvePath($params['oldpath']);
if ($mp1 === $mp2) {
self::$renamedFiles[$params['oldpath']] = array(
diff --git a/apps/files_encryption/js/settings-admin.js b/apps/files_encryption/js/settings-admin.js
index 785d02002fa..4c6b1bac2f7 100644
--- a/apps/files_encryption/js/settings-admin.js
+++ b/apps/files_encryption/js/settings-admin.js
@@ -8,8 +8,6 @@
*/
$(document).ready(function(){
- // Trigger ajax on recoveryAdmin status change
- var enabledStatus = $('#adminEnableRecovery').val();
$('input:password[name="encryptionRecoveryPassword"]').keyup(function(event) {
var recoveryPassword = $( '#encryptionRecoveryPassword' ).val();
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index 3c51c5efba2..28cd9e52f91 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -505,7 +505,7 @@ class Keymanager {
'Could not delete shareKey; does not exist: "' . $ma . '"', \OCP\Util::ERROR);
}
}
- $subdirs = $directories = glob($escapedDir . '/*', GLOB_ONLYDIR);
+ $subdirs = glob($escapedDir . '/*', GLOB_ONLYDIR);
foreach ($subdirs as $subdir) {
self::recursiveDelShareKeys($subdir, $userIds);
}
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
index cf2aa5f516f..079dafd09ff 100755
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
@@ -164,8 +164,8 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
$this->assertTrue($util->isEncryptedPath($this->userId . '/files/' . $encryptedFile));
// cleanup
- $this->view->unlink($this->userId . '/files/' . $unencryptedFile, $this->dataShort);
- $this->view->unlink($this->userId . '/files/' . $encryptedFile, $this->dataShort);
+ $this->view->unlink($this->userId . '/files/' . $unencryptedFile);
+ $this->view->unlink($this->userId . '/files/' . $encryptedFile);
}
@@ -341,8 +341,6 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
$datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/');
$userdir = $datadir . '/' . $this->userId . '/files/';
- $util = new Encryption\Util($this->view, $this->userId);
-
$this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
$fileInfoEncrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
@@ -438,7 +436,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key.moved');
// decrypt all encrypted files
- $result = $util->decryptAll('/' . $this->userId . '/' . 'files');
+ $result = $util->decryptAll();
$this->assertFalse($result);
@@ -461,7 +459,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key');
// try again to decrypt all encrypted files
- $result = $util->decryptAll('/' . $this->userId . '/' . 'files');
+ $result = $util->decryptAll();
$this->assertTrue($result);
diff --git a/apps/files_encryption/tests/webdav.php b/apps/files_encryption/tests/webdav.php
index 73bc9ce08de..c46d3bf0899 100755
--- a/apps/files_encryption/tests/webdav.php
+++ b/apps/files_encryption/tests/webdav.php
@@ -82,7 +82,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
// init filesystem view
$this->view = new \OC\Files\View('/');
- list($this->storage, $intPath) = $this->view->resolvePath('/');
+ list($this->storage, ) = $this->view->resolvePath('/');
// init short data
$this->dataShort = 'hats';
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 1838c48d95d..a19c4ffb54a 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -510,7 +510,7 @@ class Trashbin {
$sharingEnabled = \OCP\Share::isEnabled();
// get users sharing this file
- $usersSharing = $util->getSharingUsersArray($sharingEnabled, $target, $user);
+ $usersSharing = $util->getSharingUsersArray($sharingEnabled, $target);
// Attempt to set shareKey
$util->setSharedFileKeyfiles($session, $usersSharing, $target);