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,16 +22,15 @@ class Plugins {
}
$routes = [];
$pluginPages = glob(PLUGINS . '*/pages/*.php');
foreach ($pluginPages as $file) {
$file = str_replace(PLUGINS, 'plugins/', $file);
$name = pathinfo($file, PATHINFO_FILENAME);
$routes[] = [['get', 'post'], $name, $file, 1000];
}
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);
$routes[] = [['get', 'post'], $name, $file, 1000];
}
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';
if (isset($plugin['routes'])) {