MDL-24627 Unknown components are considered activity modules even if their name contains underscore

This commit is contained in:
David Mudrak
2010-10-12 12:56:59 +00:00
parent e54c41da0b
commit 8dfb8a0343
2 changed files with 40 additions and 0 deletions
+5
View File
@@ -6867,6 +6867,11 @@ function normalize_component($component) {
} else {
list($type, $plugin) = explode('_', $component, 2);
$plugintypes = get_plugin_types(false);
if ($type !== 'core' and !array_key_exists($type, $plugintypes)) {
$type = 'mod';
$plugin = $component;
}
}
return array($type, $plugin);