MDL-48494 admin: Require plugins declare their component in version.php

This commit is contained in:
David Mudrák
2015-08-31 10:01:34 +02:00
parent f5f5a60ac9
commit 98ea697349
3 changed files with 33 additions and 22 deletions
+6
View File
@@ -299,6 +299,12 @@ class core_plugin_manager {
$skipcache = true;
}
// Check if the component is properly declared.
if (empty($plugin->component) or ($plugin->component !== $type.'_'.$plug)) {
debugging('Plugin '.$type.'_'.$plug.' does not declare valid $plugin->component in its version.php.');
$skipcache = true;
}
$this->presentplugins[$type][$plug] = $plugin;
}
}