MDL-11561 admin tree improvements and bugfixing; backported from HEAD

This commit is contained in:
skodak
2007-12-19 17:38:37 +00:00
parent d7381358f8
commit 40f43aa1fc
110 changed files with 4335 additions and 4755 deletions
+4 -9
View File
@@ -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();
?>