mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
fixed broken fetching of module versions
This commit is contained in:
parent
976dc837fd
commit
d361c804a4
@ -310,11 +310,11 @@ function get_component_version($component, $source='installed') {
|
||||
return $DB->get_field('modules', 'version', array('name'=>$name));
|
||||
} else {
|
||||
$mods = get_plugin_list('mod');
|
||||
if (empty($mod[$name]) or !is_readable($mod[$name].'/version.php')) {
|
||||
if (empty($mods[$name]) or !is_readable($mods[$name].'/version.php')) {
|
||||
return false;
|
||||
} else {
|
||||
$module = new stdclass();
|
||||
include($mod[$name].'/version.php');
|
||||
include($mods[$name].'/version.php');
|
||||
return $module->version;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user