From 5921e0a06a717ca60b2e252827f47e3e896d29dd Mon Sep 17 00:00:00 2001 From: defacer Date: Thu, 27 Jan 2005 23:48:16 +0000 Subject: [PATCH] Fixed incorrect use of optional_param. Fixed the double-header bug when configuring a block in the front page, as reported in bug #2440. Credits to Dan Marsden for the report and the fix. --- index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index 5033907122..ff92250977 100644 --- a/index.php +++ b/index.php @@ -18,9 +18,9 @@ require_once($CFG->dirroot .'/mod/resource/lib.php'); require_once($CFG->dirroot .'/mod/forum/lib.php'); - optional_param('blockaction'); - optional_param('instanceid', 0, PARAM_INT); - optional_param('blockid', 0, PARAM_INT); + $blockaction = optional_param('blockaction'); + $instanceid = optional_param('instanceid', 0, PARAM_INT); + $blockid = optional_param('blockid', 0, PARAM_INT); if (! $site = get_site()) { redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php'); @@ -58,10 +58,6 @@ $PAGE = page_create_object(MOODLE_PAGE_COURSE, SITEID); - print_header(strip_tags($site->fullname), $site->fullname, 'home', '', - '', - true, '', $loginstring . '
' . $langmenu); - echo '
'; // entry wrapper start $editing = $PAGE->user_is_editing(); @@ -93,6 +89,10 @@ $preferred_width_right = min($preferred_width_right, BLOCK_R_MAX_WIDTH); $preferred_width_right = max($preferred_width_right, BLOCK_R_MIN_WIDTH); + print_header(strip_tags($site->fullname), $site->fullname, 'home', '', + '', + true, '', $loginstring . '
' . $langmenu); + ?> -- 2.39.5