Permalink
Browse files

Merge branch 'MDL-26827' of git://git.luns.net.uk/moodle

  • Loading branch information...
2 parents c889fb8 + f723bd3 commit 587a4ee42cf6ebec89619a3341e5a2370083da71 Sam Hemelryk committed Mar 21, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 admin/blocks.php
View
6 admin/blocks.php
@@ -147,7 +147,11 @@
$settings = ''; // By default, no configuration
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>';
} else {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';

0 comments on commit 587a4ee

Please sign in to comment.