Fix namespace of Files_Encryption outside of the app
This commit is contained in:
parent
7f7006643f
commit
78a307995c
|
@ -69,7 +69,7 @@ $storageInfo=OC_Helper::getStorageInfo('/', $dirInfo);
|
||||||
// if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
|
// if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
|
||||||
$encryptionInitStatus = 2;
|
$encryptionInitStatus = 2;
|
||||||
if (OC_App::isEnabled('files_encryption')) {
|
if (OC_App::isEnabled('files_encryption')) {
|
||||||
$session = new \OCA\Encryption\Session(new \OC\Files\View('/'));
|
$session = new \OCA\Files_Encryption\Session(new \OC\Files\View('/'));
|
||||||
$encryptionInitStatus = $session->getInitialized();
|
$encryptionInitStatus = $session->getInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ class Trashbin {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$util = new \OCA\Encryption\Util($rootView, $user);
|
$util = new \OCA\Files_Encryption\Util($rootView, $user);
|
||||||
|
|
||||||
$baseDir = '/files_encryption/';
|
$baseDir = '/files_encryption/';
|
||||||
if (!$util->isSystemWideMountPoint($ownerPath)) {
|
if (!$util->isSystemWideMountPoint($ownerPath)) {
|
||||||
|
@ -448,7 +448,7 @@ class Trashbin {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$util = new \OCA\Encryption\Util($rootView, $user);
|
$util = new \OCA\Files_Encryption\Util($rootView, $user);
|
||||||
|
|
||||||
$baseDir = '/files_encryption/';
|
$baseDir = '/files_encryption/';
|
||||||
if (!$util->isSystemWideMountPoint($ownerPath)) {
|
if (!$util->isSystemWideMountPoint($ownerPath)) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
|
||||||
} catch (\OCP\Files\LockNotAcquiredException $e) {
|
} catch (\OCP\Files\LockNotAcquiredException $e) {
|
||||||
// the file is currently being written to by another process
|
// the file is currently being written to by another process
|
||||||
throw new OC_Connector_Sabre_Exception_FileLocked($e->getMessage(), $e->getCode(), $e);
|
throw new OC_Connector_Sabre_Exception_FileLocked($e->getMessage(), $e->getCode(), $e);
|
||||||
} catch (\OCA\Encryption\Exception\EncryptionException $e) {
|
} catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
|
||||||
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
|
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
|
||||||
} catch (\OCP\Files\StorageNotAvailableException $e) {
|
} catch (\OCP\Files\StorageNotAvailableException $e) {
|
||||||
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
|
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
|
||||||
|
@ -166,7 +166,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
|
return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
|
||||||
} catch (\OCA\Encryption\Exception\EncryptionException $e) {
|
} catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
|
||||||
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
|
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
|
||||||
} catch (\OCP\Files\StorageNotAvailableException $e) {
|
} catch (\OCP\Files\StorageNotAvailableException $e) {
|
||||||
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
|
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
|
||||||
|
|
|
@ -11,7 +11,7 @@ $params = array('uid' => \OCP\User::getUser(),
|
||||||
'password' => $_POST['password']);
|
'password' => $_POST['password']);
|
||||||
|
|
||||||
$view = new OC\Files\View('/');
|
$view = new OC\Files\View('/');
|
||||||
$util = new \OCA\Encryption\Util($view, \OCP\User::getUser());
|
$util = new \OCA\Files_Encryption\Util($view, \OCP\User::getUser());
|
||||||
$l = \OC::$server->getL10N('settings');
|
$l = \OC::$server->getL10N('settings');
|
||||||
|
|
||||||
$result = $util->initEncryption($params);
|
$result = $util->initEncryption($params);
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Controller {
|
||||||
|
|
||||||
if (\OC_App::isEnabled('files_encryption')) {
|
if (\OC_App::isEnabled('files_encryption')) {
|
||||||
//handle the recovery case
|
//handle the recovery case
|
||||||
$util = new \OCA\Encryption\Util(new \OC\Files\View('/'), $username);
|
$util = new \OCA\Files_Encryption\Util(new \OC\Files\View('/'), $username);
|
||||||
$recoveryAdminEnabled = \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
|
$recoveryAdminEnabled = \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
|
||||||
|
|
||||||
$validRecoveryPassword = false;
|
$validRecoveryPassword = false;
|
||||||
|
|
Loading…
Reference in New Issue