diff --git a/appinfo/autoload.php b/appinfo/autoload.php index 734a7908..93a5e81f 100644 --- a/appinfo/autoload.php +++ b/appinfo/autoload.php @@ -11,9 +11,4 @@ namespace OCA\Passman\AppInfo; -use OCP\AppFramework\App; -/** - * Additional autoloader registration, e.g. registering composer autoloaders - */ -// require_once __DIR__ . '/../vendor/autoload.php'; \ No newline at end of file diff --git a/controller/credentialcontroller.php b/controller/credentialcontroller.php index cdb8065b..4a6d0a8f 100644 --- a/controller/credentialcontroller.php +++ b/controller/credentialcontroller.php @@ -145,7 +145,6 @@ class CredentialController extends ApiController { } } $link = ''; // @TODO create direct link to credential - $activity = false; if ($revision_created) { $activity = 'item_apply_revision'; $this->activityService->add( @@ -182,9 +181,9 @@ class CredentialController extends ApiController { try { $acl_list = $this->sharingService->getCredentialAclList($storedCredential->getGuid()); } catch (DoesNotExistException $exception) { - + // Just check if we have an acl list } - if ($acl_list) { + if (!empty($acl_list)) { $params = array(); switch ($activity) { case 'item_recovered': @@ -293,7 +292,7 @@ class CredentialController extends ApiController { public function updateRevision($credential_guid, $revision_id, $credential_data){ $revision = null; try { - $credential = $this->credentialService->getCredentialByGUID($credential_guid, $this->userId); + $this->credentialService->getCredentialByGUID($credential_guid, $this->userId); } catch (DoesNotExistException $e) { return new NotFoundJSONResponse(); } diff --git a/lib/Db/CredentialMapper.php b/lib/Db/CredentialMapper.php index 8557bf55..49697780 100644 --- a/lib/Db/CredentialMapper.php +++ b/lib/Db/CredentialMapper.php @@ -128,7 +128,7 @@ class CredentialMapper extends Mapper { } public function deleteCredential(Credential $credential){ - $this->delete($credential); + return $this->delete($credential); } public function upd(Credential $credential){ diff --git a/lib/Db/CredentialRevisionMapper.php b/lib/Db/CredentialRevisionMapper.php index feee9e1c..8c29b926 100644 --- a/lib/Db/CredentialRevisionMapper.php +++ b/lib/Db/CredentialRevisionMapper.php @@ -69,6 +69,6 @@ class CredentialRevisionMapper extends Mapper { $revision = new CredentialRevision(); $revision->setId($revision_id); $revision->setUserId($user_id); - $this->delete($revision); + return $this->delete($revision); } } \ No newline at end of file