diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/ApiApplicationManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/ApiApplicationManipulator.php index 058db9cc5d..7d45988f20 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/ApiApplicationManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/ApiApplicationManipulator.php @@ -51,13 +51,6 @@ class ApiApplicationManipulator implements ManipulatorInterface return $application; } - public function findByClientID($client_id) - { - return $this->repository->findOneBy([ - 'clientId' => $client_id - ]); - } - public function delete(ApiApplication $application) { $this->om->remove($application); diff --git a/lib/classes/patch/410alpha10a.php b/lib/classes/patch/410alpha10a.php index 345fcfdf3a..962d6964c5 100644 --- a/lib/classes/patch/410alpha10a.php +++ b/lib/classes/patch/410alpha10a.php @@ -13,6 +13,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Core\Configuration\PropertyAccess; use Alchemy\Phrasea\Model\Manipulator\ApiApplicationManipulator; use Alchemy\Phrasea\Model\Entities\ApiApplication; +use Alchemy\Phrasea\Model\Repositories\ApiApplicationRepository; class patch_410alpha10a implements patchInterface @@ -62,10 +63,12 @@ class patch_410alpha10a implements patchInterface { // create an api application for adobeCC - /** @var ApiApplicationManipulator $manipulator */ - $manipulator = $app['manipulator.api-application']; + /** @var ApiApplicationRepository $repo */ + $repo = $app['repo.api-applications']; + if(!$repo->findByClientId(\API_OAuth2_Application_adobeCCPlugin::CLIENT_ID)) { - if($manipulator->findByClientID(\API_OAuth2_Application_adobeCCPlugin::CLIENT_ID) === null) { + /** @var ApiApplicationManipulator $manipulator */ + $manipulator = $app['manipulator.api-application']; $application = $manipulator->create( \API_OAuth2_Application_adobeCCPlugin::CLIENT_NAME,