]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-2974 - Corrected notification of correctly entered new category with multilang...
authornicolasconnault <nicolasconnault>
Wed, 7 Mar 2007 01:25:43 +0000 (01:25 +0000)
committernicolasconnault <nicolasconnault>
Wed, 7 Mar 2007 01:25:43 +0000 (01:25 +0000)
course/index.php

index 338d3bf7d2516edcfdaa4e07869d9701263728bc..3985b13cfb1a86e6237f7d93e830c2314b0855cb 100644 (file)
     if ($form = data_submitted() and confirm_sesskey() and has_capability('moodle/category:create', $context)) {
         if (!empty($form->addcategory)) {
             unset($newcategory);
-            $newcategory->name = $form->addcategory;
+            $newcategory->name = stripslashes_safe($form->addcategory);
             $newcategory->sortorder = 999;
             if (!insert_record('course_categories', $newcategory)) {
                 notify("Could not insert the new category '" . format_string($newcategory->name) . "'");