From f09002ca18e10c3a8154f9f788f237a071c70fb6 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 20 Feb 2008 02:33:43 +0000 Subject: [PATCH] MDL-12277 Merged from 1.9 - fixes for other languages --- user/messageselect.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/user/messageselect.php b/user/messageselect.php index 368d6c1cd2..059598e32e 100644 --- a/user/messageselect.php +++ b/user/messageselect.php @@ -1,15 +1,15 @@ -dirroot.'/message/lib.php'); $id = required_param('id',PARAM_INT); $messagebody = optional_param('messagebody','',PARAM_CLEANHTML); - $send = optional_param('send','',PARAM_ALPHA); + $send = optional_param('send','',PARAM_RAW); // Content is actually treated as boolean + $preview = optional_param('preview','',PARAM_RAW); // Content is actually treated as boolean + $edit = optional_param('edit','',PARAM_RAW); // Content is actually treated as boolean $returnto = optional_param('returnto','',PARAM_LOCALURL); - $preview = optional_param('preview','',PARAM_ALPHA); $format = optional_param('format',FORMAT_MOODLE,PARAM_INT); - $edit = optional_param('edit','',PARAM_ALPHA); $deluser = optional_param('deluser',0,PARAM_INT); if (!$course = get_record('course','id',$id)) { @@ -88,17 +88,17 @@ if (!empty($messagebody) && !$edit && !$deluser && ($preview || $send)) { if (count($SESSION->emailto[$id])) { - if ($preview) { + if (!empty($preview)) { echo '
- + '; echo "

".get_string('previewhtml')."

\n".format_text(stripslashes($messagebody),$format)."\n
\n"; echo '

'."\n"; - echo '

'; + echo '

'; echo "\n
"; - } elseif ($send) { + } else if (!empty($send)) { $good = 1; $teachers = array(); foreach ($SESSION->emailto[$id] as $user) { @@ -107,7 +107,7 @@ $teachers[] = $user->id; } } - if ($good) { + if (!empty($good)) { print_heading(get_string('messagedselectedusers')); unset($SESSION->emailto[$id]); unset($SESSION->emailselect[$id]); @@ -139,5 +139,5 @@ print_footer(); -} + ?> -- 2.39.5