From 7cf5d28a990a16b14bbda4182b15e9d6754d2008 Mon Sep 17 00:00:00 2001 From: Thibaud Fabre Date: Tue, 27 Sep 2016 11:38:29 +0200 Subject: [PATCH] Fix configuration setting access --- lib/Alchemy/Phrasea/ControllerProvider/Api/OAuth2.php | 2 +- lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php | 2 +- lib/Alchemy/Phrasea/ControllerProvider/Api/V2.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Api/OAuth2.php b/lib/Alchemy/Phrasea/ControllerProvider/Api/OAuth2.php index 5977043b44..17a78e6ded 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Api/OAuth2.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Api/OAuth2.php @@ -38,7 +38,7 @@ class OAuth2 implements ControllerProviderInterface, ServiceProviderInterface /** @var PropertyAccess $config */ $config = $app['conf']; - if ($config->get('api_disable', false) == true) { + if ($config->get([ 'main', 'api_disable' ], false) == true) { return $app['controllers_factory']; } diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php b/lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php index 3136a1488f..917d9ee0df 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Api/V1.php @@ -50,7 +50,7 @@ class V1 implements ControllerProviderInterface, ServiceProviderInterface /** @var PropertyAccess $config */ $config = $app['conf']; - if ($config->get('api_disable', false) == true) { + if ($config->get([ 'main', 'api_disable' ], false) == true) { return $app['controllers_factory']; } diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Api/V2.php b/lib/Alchemy/Phrasea/ControllerProvider/Api/V2.php index 124f5c03b6..9d5e803646 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Api/V2.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Api/V2.php @@ -74,7 +74,7 @@ class V2 implements ControllerProviderInterface, ServiceProviderInterface /** @var PropertyAccess $config */ $config = $app['conf']; - if ($config->get('api_disable', false) == true) { + if ($config->get([ 'main', 'api_disable' ], false) == true) { return $app['controllers_factory']; }