MDL-11561 admin tree improvements and bugfixing; backported from HEAD
This commit is contained in:
+4
-9
@@ -6,14 +6,14 @@
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->libdir.'/blocklib.php');
|
||||
|
||||
admin_externalpage_setup('manageblocks');
|
||||
|
||||
$blockid = required_param('block', PARAM_INT);
|
||||
|
||||
if(($blockrecord = blocks_get_record($blockid)) === false) {
|
||||
if(!$blockrecord = blocks_get_record($blockid)) {
|
||||
error('This block does not exist');
|
||||
}
|
||||
|
||||
admin_externalpage_setup('blocksetting'.$blockrecord->name);
|
||||
|
||||
$block = block_instance($blockrecord->name);
|
||||
if($block === false) {
|
||||
error('Problem in instantiating block object');
|
||||
@@ -50,11 +50,6 @@
|
||||
$strmanageblocks = get_string('manageblocks');
|
||||
$strblockname = $block->get_title();
|
||||
|
||||
// $CFG->pagepath is used to generate the body and id attributes for the body tag
|
||||
// of the page. It is also used to generate the link to the Moodle Docs for this view.
|
||||
$CFG->pagepath = 'block/' . $block->name() . '/config';
|
||||
|
||||
|
||||
admin_externalpage_print_header();
|
||||
|
||||
print_heading($strblockname);
|
||||
@@ -70,6 +65,6 @@
|
||||
echo '</p>';
|
||||
$block->config_print();
|
||||
echo '</form>';
|
||||
admin_externalpage_print_footer();
|
||||
print_footer();
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user