mirror of
https://github.com/getgrav/grav.git
synced 2026-02-06 23:00:24 +01:00
Merge pull request #511 from getgrav/feature/fix-multisite-subfolder
Make $container available in setup.php
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user