Skip to content

Commit

Permalink
Merge branch 'MDL-26827' of git://git.luns.net.uk/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Mar 21, 2011
2 parents c889fb8 + f723bd3 commit 587a4ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/blocks.php
Expand Up @@ -147,7 +147,11 @@


$settings = ''; // By default, no configuration $settings = ''; // By default, no configuration
if ($blockobject and $blockobject->has_config()) { if ($blockobject and $blockobject->has_config()) {
if (file_exists($CFG->dirroot.'/blocks/'.$block->name.'/settings.php')) { $blocksettings = admin_get_root()->locate('blocksetting' . $block->name);

if ($blocksettings instanceof admin_externalpage) {
$settings = '<a href="' . $blocksettings->url . '">' . get_string('settings') . '</a>';
} else if ($blocksettings instanceof admin_settingpage) {
$settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>'; $settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>';
} else { } else {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>'; $settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
Expand Down

0 comments on commit 587a4ee

Please sign in to comment.