mirror of
https://github.com/moodle/moodle.git
synced 2025-03-03 23:46:09 +01:00
Merge branch 'w42_MDL-42292_m26_blockversion' of https://github.com/skodak/moodle
This commit is contained in:
commit
f71011e825
@ -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')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user