修复多个模板重复加载相同hook导致的问题

This commit is contained in:
Edward Yang 2023-07-19 11:36:53 +08:00
parent 7e3f2be082
commit 99f87cc9e6
2 changed files with 4 additions and 1 deletions

View File

@ -159,7 +159,6 @@ class SettingRepo
self::clearCache();
}
/**
* Clear all cache.
*/

View File

@ -54,7 +54,11 @@ class PluginServiceProvider extends ServiceProvider
}
$enabledPlugins = $manager->getEnabledPlugins();
$currentTheme = system_setting('base.theme');
foreach ($enabledPlugins as $plugin) {
if($plugin->type == 'theme' && $plugin->code != $currentTheme) {
continue;
}
$pluginCode = $plugin->getDirname();
$this->bootPlugin($plugin);
$this->registerRoutes($pluginCode);