mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
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.
This commit is contained in:
parent
18d20603ca
commit
5921e0a06a
14
index.php
14
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', '',
|
||||
'<meta name="description" content="'. s(strip_tags($site->summary)) .'" />',
|
||||
true, '', $loginstring . '<br />' . $langmenu);
|
||||
|
||||
echo '<div id="entry-page" class="entry">'; // 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', '',
|
||||
'<meta name="description" content="'. s(strip_tags($site->summary)) .'" />',
|
||||
true, '', $loginstring . '<br />' . $langmenu);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user