mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 22:50:19 +01:00
Fix for blocks capability updates. Somehow missed this commit last night.
This commit is contained in:
parent
fa9234e0e0
commit
48f6bcddd2
@ -1164,7 +1164,8 @@ function upgrade_blocks_plugins($continueto) {
|
||||
if (! update_record('block', $block)) {
|
||||
error('Could not update block '. $block->name .' record in block table!');
|
||||
}
|
||||
if (!update_capabilities('blocks/'.$block->name)) {
|
||||
$component = 'block/'.$block->name;
|
||||
if (!update_capabilities($component)) {
|
||||
error('Could not update '.$block->name.' capabilities!');
|
||||
}
|
||||
notify(get_string('blocksuccess', '', $blocktitle), 'notifysuccess');
|
||||
@ -1220,7 +1221,8 @@ function upgrade_blocks_plugins($continueto) {
|
||||
if ($status) {
|
||||
if ($block->id = insert_record('block', $block)) {
|
||||
$blockobj->after_install();
|
||||
if (!update_capabilities('blocks/', $block->name)) {
|
||||
$component = 'block/'.$block->name;
|
||||
if (!update_capabilities($component)) {
|
||||
notify('Could not set up '.$block->name.' capabilities!');
|
||||
}
|
||||
notify(get_string('blocksuccess', '', $blocktitle), 'notifysuccess');
|
||||
|
Loading…
x
Reference in New Issue
Block a user