1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Refactoring to drop extensions dir, see #774

satisfy nitpick
This commit is contained in:
Daniel Klabbers
2016-03-02 08:56:37 +01:00
parent 1b5b91c85b
commit 15c0a8c2db
3 changed files with 87 additions and 38 deletions

View File

@@ -21,15 +21,12 @@ class ExtensionServiceProvider extends AbstractServiceProvider
{
$this->app->bind('flarum.extensions', 'Flarum\Extension\ExtensionManager');
$config = $this->app->make('flarum.settings')->get('extensions_enabled');
$extensions = json_decode($config, true);
$bootstrappers = $this->app->make('flarum.extensions')->getEnabledBootstrappers();
foreach ($extensions as $extension) {
if (file_exists($file = public_path().'/extensions/'.$extension.'/bootstrap.php')) {
$bootstrapper = require $file;
foreach ($bootstrappers as $file) {
$bootstrapper = require $file;
$this->app->call($bootstrapper);
}
$this->app->call($bootstrapper);
}
}
}