skip non-php files when loading plugin files
This commit is contained in:
parent
0f4281f415
commit
df976a8229
@ -138,6 +138,7 @@ class PluginManager {
|
|||||||
}
|
}
|
||||||
$plugin = new $pluginClass();
|
$plugin = new $pluginClass();
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @var Plugin $plugin
|
* @var Plugin $plugin
|
||||||
*/
|
*/
|
||||||
$this->activePlugins[$pluginClass] = $plugin;
|
$this->activePlugins[$pluginClass] = $plugin;
|
||||||
@ -170,6 +171,7 @@ class PluginManager {
|
|||||||
}
|
}
|
||||||
$plugin = $this->activePlugins[$pluginClass];
|
$plugin = $this->activePlugins[$pluginClass];
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @var Plugin $plugin
|
* @var Plugin $plugin
|
||||||
*/
|
*/
|
||||||
$plugin->unload();
|
$plugin->unload();
|
||||||
@ -235,6 +237,9 @@ class PluginManager {
|
|||||||
|
|
||||||
$filePath = $directory . $pluginFile;
|
$filePath = $directory . $pluginFile;
|
||||||
if (is_file($filePath)) {
|
if (is_file($filePath)) {
|
||||||
|
if (!stripos($pluginFile, '.php')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$success = include_once $filePath;
|
$success = include_once $filePath;
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
trigger_error("Error loading File '{$filePath}'!");
|
trigger_error("Error loading File '{$filePath}'!");
|
||||||
|
Loading…
Reference in New Issue
Block a user