mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Fixed: disabled plugins should not enable pages
This commit is contained in:
parent
1a6fb8bee2
commit
cfdbc2a8b2
@ -22,8 +22,8 @@ class Plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$routes = [];
|
$routes = [];
|
||||||
|
foreach(self::getAllPluginsJson() as $plugin) {
|
||||||
$pluginPages = glob(PLUGINS . '*/pages/*.php');
|
$pluginPages = glob(PLUGINS . $plugin['filename'] . '/pages/*.php');
|
||||||
foreach ($pluginPages as $file) {
|
foreach ($pluginPages as $file) {
|
||||||
$file = str_replace(PLUGINS, 'plugins/', $file);
|
$file = str_replace(PLUGINS, 'plugins/', $file);
|
||||||
$name = pathinfo($file, PATHINFO_FILENAME);
|
$name = pathinfo($file, PATHINFO_FILENAME);
|
||||||
@ -31,7 +31,6 @@ class Plugins {
|
|||||||
$routes[] = [['get', 'post'], $name, $file, 1000];
|
$routes[] = [['get', 'post'], $name, $file, 1000];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(self::getAllPluginsJson() as $plugin) {
|
|
||||||
$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