Skip to content

Commit

Permalink
Fix for blocks capability updates. Somehow missed this commit last ni…
Browse files Browse the repository at this point in the history
…ght.
  • Loading branch information
vyshane committed Sep 13, 2006
1 parent fa9234e commit 48f6bcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/blocklib.php
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 48f6bcd

Please sign in to comment.