Skip to content

Commit

Permalink
Merge branch 'MDL-50880-master' of git://github.com/marinaglancy/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Aug 20, 2015
2 parents 7046798 + 40e5012 commit 3ac1350
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -977,24 +977,24 @@ function message_format_message_text($message, $forcetexttohtml = false) {

$format = $message->fullmessageformat;

if ($message->smallmessage !== '') {
if (strval($message->smallmessage) !== '') {
if ($message->notification == 1) {
if ($message->fullmessagehtml !== '' or $message->fullmessage !== '') {
if (strval($message->fullmessagehtml) !== '' or strval($message->fullmessage) !== '') {
$format = FORMAT_PLAIN;
}
}
$messagetext = $message->smallmessage;

} else if ($message->fullmessageformat == FORMAT_HTML) {
if ($message->fullmessagehtml !== '') {
if (strval($message->fullmessagehtml) !== '') {
$messagetext = $message->fullmessagehtml;
} else {
$messagetext = $message->fullmessage;
$format = FORMAT_MOODLE;
}

} else {
if ($message->fullmessage !== '') {
if (strval($message->fullmessage) !== '') {
$messagetext = $message->fullmessage;
} else {
$messagetext = $message->fullmessagehtml;
Expand Down

0 comments on commit 3ac1350

Please sign in to comment.