]> git.mjollnir.org Git - moodle.git/commitdiff
fixed register globals issue with $text; merged from MOODLE_16_STABLE
authorskodak <skodak>
Sun, 21 May 2006 08:09:43 +0000 (08:09 +0000)
committerskodak <skodak>
Sun, 21 May 2006 08:09:43 +0000 (08:09 +0000)
lib/editor/htmlarea/coursefiles.php

index 678c6bbd1d2123b0443109269069c1b54ebc37b4..9d3d73f88a7ed276c9ad0812d5f1e565a03460e5 100644 (file)
@@ -22,6 +22,7 @@
     $oldname = optional_param('oldname', '', PARAM_FILE);
     $usecheckboxes  = optional_param('usecheckboxes', 1, PARAM_INT);
     $save    = optional_param('save', 0, PARAM_BOOL);
+    $text    = optional_param('text', '', PARAM_RAW);
     $confirm = optional_param('confirm', 0, PARAM_BOOL);
 
 
 
         case "edit":
             html_header($course, $wdir);
-            if (isset($text) and confirm_sesskey()) {
+            if (($text != '') and confirm_sesskey()) {
                 $fileptr = fopen($basedir.$file,"w");
                 fputs($fileptr, stripslashes($text));
                 fclose($fileptr);