skip non-php files when loading plugin files

This commit is contained in:
Steffen Schröder 2014-05-01 20:20:47 +02:00
parent 0f4281f415
commit df976a8229

View File

@ -138,6 +138,7 @@ class PluginManager {
}
$plugin = new $pluginClass();
/**
*
* @var Plugin $plugin
*/
$this->activePlugins[$pluginClass] = $plugin;
@ -170,6 +171,7 @@ class PluginManager {
}
$plugin = $this->activePlugins[$pluginClass];
/**
*
* @var Plugin $plugin
*/
$plugin->unload();
@ -235,6 +237,9 @@ class PluginManager {
$filePath = $directory . $pluginFile;
if (is_file($filePath)) {
if (!stripos($pluginFile, '.php')) {
continue;
}
$success = include_once $filePath;
if (!$success) {
trigger_error("Error loading File '{$filePath}'!");