]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove unused code
authorBjoern Schiessle <schiessle@owncloud.com>
Wed, 18 Jun 2014 11:26:42 +0000 (13:26 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Wed, 18 Jun 2014 11:26:42 +0000 (13:26 +0200)
apps/files_encryption/hooks/hooks.php
apps/files_encryption/js/settings-admin.js
apps/files_encryption/lib/keymanager.php
apps/files_encryption/tests/util.php
apps/files_encryption/tests/webdav.php
apps/files_trashbin/lib/trashbin.php

index 6f739947b0c562a1650b39b805b3a2bb8dfaeb9b..df101acab9d9645ab23ae78e4bd44aec59685c96 100644 (file)
@@ -406,7 +406,6 @@ class Hooks {
                // otherwise we perform a stream copy, so we get a new set of keys\r
                $mp1 = $view->getMountPoint('/' . $user . '/files/' . $params['oldpath']);\r
                $mp2 = $view->getMountPoint('/' . $user . '/files/' . $params['newpath']);\r
-               list($storage1, ) = Filesystem::resolvePath($params['oldpath']);\r
 \r
                if ($mp1 === $mp2) {\r
                        self::$renamedFiles[$params['oldpath']] = array(\r
index 785d02002fa28caed4a438d8ff9c9a6086d23413..4c6b1bac2f7c5169961e2d0a674af0754de52035 100644 (file)
@@ -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();
index 3c51c5efba20759d6ceab8fbb157528aedbc2d81..28cd9e52f91968a9817b3ca0933ac266f4da8df0 100755 (executable)
@@ -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);
                }
index cf2aa5f516ff36cf27a6f32189a34b883a76ddcb..079dafd09ff102955b9aa8ef7914e56ff16a4dbd 100755 (executable)
@@ -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);
 
index 73bc9ce08dea9d0ca7d7647cb5b3fc87f9fac2d6..c46d3bf089947251881586175200c937743d8194 100755 (executable)
@@ -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';
 
index 1838c48d95d52869855442cda24132d9477490e1..a19c4ffb54a0158178bc6b3569daf5d23aae9aa4 100644 (file)
@@ -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);