Merge pull request #511 from getgrav/feature/fix-multisite-subfolder

Make $container available in setup.php
This commit is contained in:
Flavio Copes
2015-12-09 17:25:31 +01:00
2 changed files with 7 additions and 2 deletions

View File

@@ -113,8 +113,13 @@ class Setup extends Data
],
];
public function __construct($environment = 'localhost')
public function __construct($container)
{
$environment = $container['uri']->environment();
if (!$environment) {
$environment = 'localhost';
}
// Pre-load setup.php which contains our initial configuration.
// Configuration may contain dynamic parts, which is why we need to always load it.
$file = GRAV_ROOT . '/setup.php';

View File

@@ -40,7 +40,7 @@ class ConfigServiceProvider implements ServiceProviderInterface
public static function setup(Container $container)
{
return new Setup($container['uri']->environment());
return new Setup($container);
}
public static function blueprints(Container $container)