mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
Fixed: disabled plugins should not enable pages
This commit is contained in:
parent
1a6fb8bee2
commit
cfdbc2a8b2
@ -22,16 +22,15 @@ class Plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$routes = [];
|
$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) {
|
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'] . ' - ';
|
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';
|
||||||
|
|
||||||
if (isset($plugin['routes'])) {
|
if (isset($plugin['routes'])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user