mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix API plugin route initialization and remove odd syntax
This commit is contained in:
@@ -664,7 +664,7 @@ class Application extends SilexApplication
|
|||||||
$loader->registerProviders(RouteLoader::$defaultProviders);
|
$loader->registerProviders(RouteLoader::$defaultProviders);
|
||||||
|
|
||||||
$loader->bindRoutes($this);
|
$loader->bindRoutes($this);
|
||||||
$loader->bindPluginRoutes($this, 'plugin.controller_providers.root');
|
$this->bindPluginRoutes('plugin.controller_providers.root');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1141,6 +1141,8 @@ class Application extends SilexApplication
|
|||||||
*/
|
*/
|
||||||
public function bindPluginRoutes($routeParameter)
|
public function bindPluginRoutes($routeParameter)
|
||||||
{
|
{
|
||||||
|
$loader = new RouteLoader();
|
||||||
|
|
||||||
|
$loader->bindPluginRoutes($this, $routeParameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@ class SetupMiddlewareProvider implements ServiceProviderInterface
|
|||||||
{
|
{
|
||||||
Assertion::isInstanceOf($app, \Alchemy\Phrasea\Application::class);
|
Assertion::isInstanceOf($app, \Alchemy\Phrasea\Application::class);
|
||||||
|
|
||||||
$app['setup.validate-config'] = $app->share($app->protect(function (Request $request) use ($app) {
|
$app['setup.validate-config'] = $app->protect(function (Request $request) use ($app) {
|
||||||
if (0 === strpos($request->getPathInfo(), '/setup')) {
|
if (0 === strpos($request->getPathInfo(), '/setup')) {
|
||||||
if (!$app['phraseanet.configuration-tester']->isInstalled()) {
|
if (!$app['phraseanet.configuration-tester']->isInstalled()) {
|
||||||
if (!$app['phraseanet.configuration-tester']->isBlank()) {
|
if (!$app['phraseanet.configuration-tester']->isBlank()) {
|
||||||
@@ -36,7 +36,7 @@ class SetupMiddlewareProvider implements ServiceProviderInterface
|
|||||||
$app['firewall']->requireSetup();
|
$app['firewall']->requireSetup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user