mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-13 09:04:57 +01:00
wrong order
This commit is contained in:
parent
7a8903f3b3
commit
300e3e8b27
@ -50,18 +50,18 @@ class PluginService
|
||||
}
|
||||
}
|
||||
|
||||
// Load config
|
||||
$config = plugin_path($plugin->id, 'config', $plugin->id . '.php');
|
||||
if (file_exists($config)) {
|
||||
config()->set($plugin->id, require $config);
|
||||
}
|
||||
|
||||
// Always autoload src directory to make sure all class names can be resolved (e.g. in migrations)
|
||||
$namespace = $plugin->namespace . '\\';
|
||||
if (!array_key_exists($namespace, $classLoader->getPrefixesPsr4())) {
|
||||
$classLoader->setPsr4($namespace, plugin_path($plugin->id, 'src/'));
|
||||
}
|
||||
|
||||
// Load config
|
||||
$config = plugin_path($plugin->id, 'config', $plugin->id . '.php');
|
||||
if (file_exists($config)) {
|
||||
config()->set($plugin->id, require $config);
|
||||
}
|
||||
|
||||
// Filter out plugins that should not be loaded (e.g. because they are disabled or not installed yet)
|
||||
if (!$plugin->shouldLoad()) {
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user