Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-11608 Removed stripslashes_safe($rename) and changed PARAM_RAW to…

… PARAM_TEXT for rename param
  • Loading branch information...
commit 1ffd2c0ac6c9099cf11b9654e8011d9a3cb2518f 1 parent e1be60d
nicolasconnault authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 course/category.php
View
4 course/category.php
@@ -15,7 +15,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);
$addsubcategory=optional_param('addsubcategory', '', PARAM_NOTAGS);
@@ -66,7 +66,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");
}
Please sign in to comment.
Something went wrong with that request. Please try again.