]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for blocks capability updates. Somehow missed this commit last night.
authorvyshane <vyshane>
Wed, 13 Sep 2006 04:08:58 +0000 (04:08 +0000)
committervyshane <vyshane>
Wed, 13 Sep 2006 04:08:58 +0000 (04:08 +0000)
lib/blocklib.php

index 3b957b03610df1cfd99973f10f10a20d2793bb3f..8dd157c6e7e5ae610a6f269e8e08189ac95cdcf1 100644 (file)
@@ -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');