MDL-11608 Removed stripslashes_safe($rename) and changed PARAM_RAW to PARAM_TEXT for rename param

This commit is contained in:
nicolasconnault
2007-10-10 04:59:35 +00:00
parent cd405db239
commit 150f64e661
+2 -2
View File
@@ -16,7 +16,7 @@
$moveup = optional_param('moveup', 0, PARAM_INT);
$movedown = optional_param('movedown', 0, PARAM_INT);
$moveto = optional_param('moveto', 0, PARAM_INT);
$rename = optional_param('rename', '', PARAM_RAW);
$rename = optional_param('rename', '', PARAM_TEXT);
$resort = optional_param('resort', 0, PARAM_BOOL);
$categorytheme= optional_param('categorytheme', false, PARAM_CLEAN);
@@ -54,7 +54,7 @@
if (has_capability('moodle/category:update', $context)) {
/// Rename the category if requested
if (!empty($rename) and confirm_sesskey()) {
$category->name = stripslashes_safe($rename);
$category->name = $rename;
if (! set_field("course_categories", "name", $category->name, "id", $category->id)) {
notify("An error occurred while renaming the category");
}