Merge pull request #9093 from owncloud/remove_unused_code
remove unused code
This commit is contained in:
commit
1973fdb11d
|
@ -406,7 +406,6 @@ class Hooks {
|
||||||
// otherwise we perform a stream copy, so we get a new set of keys
|
// otherwise we perform a stream copy, so we get a new set of keys
|
||||||
$mp1 = $view->getMountPoint('/' . $user . '/files/' . $params['oldpath']);
|
$mp1 = $view->getMountPoint('/' . $user . '/files/' . $params['oldpath']);
|
||||||
$mp2 = $view->getMountPoint('/' . $user . '/files/' . $params['newpath']);
|
$mp2 = $view->getMountPoint('/' . $user . '/files/' . $params['newpath']);
|
||||||
list($storage1, ) = Filesystem::resolvePath($params['oldpath']);
|
|
||||||
|
|
||||||
if ($mp1 === $mp2) {
|
if ($mp1 === $mp2) {
|
||||||
self::$renamedFiles[$params['oldpath']] = array(
|
self::$renamedFiles[$params['oldpath']] = array(
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// Trigger ajax on recoveryAdmin status change
|
|
||||||
var enabledStatus = $('#adminEnableRecovery').val();
|
|
||||||
|
|
||||||
$('input:password[name="encryptionRecoveryPassword"]').keyup(function(event) {
|
$('input:password[name="encryptionRecoveryPassword"]').keyup(function(event) {
|
||||||
var recoveryPassword = $( '#encryptionRecoveryPassword' ).val();
|
var recoveryPassword = $( '#encryptionRecoveryPassword' ).val();
|
||||||
|
|
|
@ -505,7 +505,7 @@ class Keymanager {
|
||||||
'Could not delete shareKey; does not exist: "' . $ma . '"', \OCP\Util::ERROR);
|
'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) {
|
foreach ($subdirs as $subdir) {
|
||||||
self::recursiveDelShareKeys($subdir, $userIds);
|
self::recursiveDelShareKeys($subdir, $userIds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,8 +164,8 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
|
||||||
$this->assertTrue($util->isEncryptedPath($this->userId . '/files/' . $encryptedFile));
|
$this->assertTrue($util->isEncryptedPath($this->userId . '/files/' . $encryptedFile));
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
$this->view->unlink($this->userId . '/files/' . $unencryptedFile, $this->dataShort);
|
$this->view->unlink($this->userId . '/files/' . $unencryptedFile);
|
||||||
$this->view->unlink($this->userId . '/files/' . $encryptedFile, $this->dataShort);
|
$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/');
|
$datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/');
|
||||||
$userdir = $datadir . '/' . $this->userId . '/files/';
|
$userdir = $datadir . '/' . $this->userId . '/files/';
|
||||||
|
|
||||||
$util = new Encryption\Util($this->view, $this->userId);
|
|
||||||
|
|
||||||
$this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
|
$this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);
|
||||||
|
|
||||||
$fileInfoEncrypted = $this->view->getFileInfo($this->userId . '/files/' . $filename);
|
$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');
|
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key.moved');
|
||||||
|
|
||||||
// decrypt all encrypted files
|
// decrypt all encrypted files
|
||||||
$result = $util->decryptAll('/' . $this->userId . '/' . 'files');
|
$result = $util->decryptAll();
|
||||||
|
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
|
||||||
|
@ -461,7 +459,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
|
||||||
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key');
|
$this->userId . '/files_encryption/keyfiles/' . $file1 . '.key');
|
||||||
|
|
||||||
// try again to decrypt all encrypted files
|
// try again to decrypt all encrypted files
|
||||||
$result = $util->decryptAll('/' . $this->userId . '/' . 'files');
|
$result = $util->decryptAll();
|
||||||
|
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
// init filesystem view
|
// init filesystem view
|
||||||
$this->view = new \OC\Files\View('/');
|
$this->view = new \OC\Files\View('/');
|
||||||
list($this->storage, $intPath) = $this->view->resolvePath('/');
|
list($this->storage, ) = $this->view->resolvePath('/');
|
||||||
// init short data
|
// init short data
|
||||||
$this->dataShort = 'hats';
|
$this->dataShort = 'hats';
|
||||||
|
|
||||||
|
|
|
@ -510,7 +510,7 @@ class Trashbin {
|
||||||
$sharingEnabled = \OCP\Share::isEnabled();
|
$sharingEnabled = \OCP\Share::isEnabled();
|
||||||
|
|
||||||
// get users sharing this file
|
// get users sharing this file
|
||||||
$usersSharing = $util->getSharingUsersArray($sharingEnabled, $target, $user);
|
$usersSharing = $util->getSharingUsersArray($sharingEnabled, $target);
|
||||||
|
|
||||||
// Attempt to set shareKey
|
// Attempt to set shareKey
|
||||||
$util->setSharedFileKeyfiles($session, $usersSharing, $target);
|
$util->setSharedFileKeyfiles($session, $usersSharing, $target);
|
||||||
|
|
|
@ -309,6 +309,7 @@ class Storage {
|
||||||
private static function getAllVersions($uid) {
|
private static function getAllVersions($uid) {
|
||||||
$view = new \OC\Files\View('/' . $uid . '/');
|
$view = new \OC\Files\View('/' . $uid . '/');
|
||||||
$dirs = array(self::VERSIONS_ROOT);
|
$dirs = array(self::VERSIONS_ROOT);
|
||||||
|
$versions = array();
|
||||||
|
|
||||||
while (!empty($dirs)) {
|
while (!empty($dirs)) {
|
||||||
$dir = array_pop($dirs);
|
$dir = array_pop($dirs);
|
||||||
|
|
Loading…
Reference in New Issue