MDL-47979 blocks: Do not display link to legacy file admin/block.php
authorDavid Mudrák <david@moodle.com>
Mon, 9 Nov 2015 12:30:40 +0000 (13:30 +0100)
committerDavid Mudrák <david@moodle.com>
Mon, 9 Nov 2015 12:30:40 +0000 (13:30 +0100)
The deprecated file admin/block.php was removed in Moodle 2.6. Since
then, all blocks that declare has_config() must provide a settings.php
file.

admin/blocks.php

index a37af21..77febe6 100644 (file)
             } 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>';
+                debugging('Warning: block_'.$block->name.' returns true in has_config() but does not provide a settings.php file',
+                    DEBUG_DEVELOPER);
             }
         }