Fixed: disabled plugins should not enable pages

This commit is contained in:
slawkens 2024-01-27 00:46:34 +01:00
parent 1a6fb8bee2
commit cfdbc2a8b2

View File

@ -22,8 +22,8 @@ class Plugins {
}
$routes = [];
$pluginPages = glob(PLUGINS . '*/pages/*.php');
foreach(self::getAllPluginsJson() as $plugin) {
$pluginPages = glob(PLUGINS . $plugin['filename'] . '/pages/*.php');
foreach ($pluginPages as $file) {
$file = str_replace(PLUGINS, 'plugins/', $file);
$name = pathinfo($file, PATHINFO_FILENAME);
@ -31,7 +31,6 @@ class Plugins {
$routes[] = [['get', 'post'], $name, $file, 1000];
}
foreach(self::getAllPluginsJson() as $plugin) {
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';
if (isset($plugin['routes'])) {