Merge branch 'w42_MDL-42292_m26_blockversion' of https://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-10-13 23:09:53 +02:00
commit f71011e825

View File

@ -294,7 +294,11 @@ function get_component_version($component, $source='installed') {
// block
if ($type === 'block') {
if ($source === 'installed') {
return $DB->get_field('block', 'version', array('name'=>$name));
if ($CFG->version < 2013092001.02) {
return $DB->get_field('block', 'version', array('name'=>$name));
} else {
return get_config('block_'.$name, 'version');
}
} else {
$blocks = core_component::get_plugin_list('block');
if (empty($blocks[$name]) or !is_readable($blocks[$name].'/version.php')) {