Skip to content

Commit

Permalink
MDL-23184 PARAM_CLEANHTML used in messaging for now, adding some hint…
Browse files Browse the repository at this point in the history
…s how to implement support for text formats properly
  • Loading branch information
skodak committed Sep 2, 2010
1 parent fb59f2f commit 484a976
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions admin/user/user_bulk_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_once($CFG->dirroot.'/message/lib.php');
require_once('user_message_form.php');

$msg = optional_param('msg', '', PARAM_CLEAN);
$msg = optional_param('msg', '', PARAM_CLEANHTML);
$confirm = optional_param('confirm', 0, PARAM_BOOL);

require_login();
Expand All @@ -27,7 +27,7 @@
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
if ($rs = $DB->get_recordset_select('user', "id $in", $params)) {
foreach ($rs as $user) {
message_post_message($USER, $user, $msg, FORMAT_HTML, 'direct');
message_post_message($USER, $user, $msg, FORMAT_HTML, 'direct'); // TODO: this is weird, we should support all text formats here
}
$rs->close();
}
Expand All @@ -52,9 +52,9 @@
$usernames = implode(', ', $userlist);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('confirmation', 'admin'));
echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview'); //TODO: clean once we start using proper text formats here

$formcontinue = new single_button(new moodle_url('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg)), get_string('yes'));
$formcontinue = new single_button(new moodle_url('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg)), get_string('yes')); //TODO: clean once we start using proper text formats here
$formcancel = new single_button('user_bulk.php', get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel);
echo $OUTPUT->footer();
Expand Down

0 comments on commit 484a976

Please sign in to comment.