MDL-6826 Removed the optional_param lines at the top, and set the submit buttons to PARAM_RAW. Also changed !empty() to isset()

This commit is contained in:
nicolasconnault
2008-02-06 10:24:26 +00:00
parent eda7a6b347
commit 8fc5a75c11
2 changed files with 3 additions and 4 deletions
+1 -3
View File
@@ -12,8 +12,6 @@
//return to course/view.php if false or mod/modname/view.php if true
$return = optional_param('return', 0, PARAM_BOOL);
$type = optional_param('type', '', PARAM_ALPHANUM);
$submitbutton = optional_param('submitbutton', null, PARAM_ALPHANUM);
$submitbutton2 = optional_param('submitbutton2', null, PARAM_ALPHANUM);
if (!empty($add)) {
$section = required_param('section', PARAM_INT);
@@ -272,7 +270,7 @@
rebuild_course_cache($course->id);
if (!empty($fromform->submitbutton)) {
if (isset($fromform->submitbutton)) {
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$fromform->coursemodule");
} else {
redirect("$CFG->wwwroot/course/view.php?id=$course->id");
+2 -1
View File
@@ -179,9 +179,10 @@ class moodleform_mod extends moodleform {
}
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->setType('buttonar', PARAM_RAW);
$mform->closeHeaderBefore('buttonar');
}
}
?>
?>