Merge branch 'w29_MDL-40423_m26_localsubdir' of https://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2013-07-16 21:55:46 +02:00
@@ -118,7 +118,8 @@ class create_xml_file extends XMLDBAction {
function get_plugin_type($dirpath) {
global $CFG;
$dirpath = $CFG->dirroot.$dirpath;
$plugintypes = get_plugin_types();
// Reverse order so that we get subplugin matches.
$plugintypes = array_reverse(core_component::get_plugin_types());
foreach ($plugintypes as $plugintype => $pluginbasedir) {
if (substr($dirpath, 0, strlen($pluginbasedir)) == $pluginbasedir) {
return $plugintype;