From 4eff058d5a80da3b2b15349f1f16064cb8189eba Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 21 May 2006 08:09:43 +0000 Subject: [PATCH] fixed register globals issue with $text; merged from MOODLE_16_STABLE --- lib/editor/htmlarea/coursefiles.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/editor/htmlarea/coursefiles.php b/lib/editor/htmlarea/coursefiles.php index 678c6bbd1d..9d3d73f88a 100644 --- a/lib/editor/htmlarea/coursefiles.php +++ b/lib/editor/htmlarea/coursefiles.php @@ -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); @@ -393,7 +394,7 @@ 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); -- 2.39.5