Checking if exist $message_to_post

I think it's usable, as for me, when I want to disable operator returning message (too many flood, when using mobile device/tablet) in the locales file simply removing the content of variable.

If this checking is not exist, the empty messages with dates will appear in chat.
This commit is contained in:
falcon4fun 2013-10-06 12:35:36 +03:00
parent 849cb79b0f
commit 7d2a91ab9a

View File

@ -707,7 +707,9 @@ function check_for_reassign($thread, $operator)
$message_to_post = getstring2_("chat.status.operator.returned", array($operatorName), $thread['locale'], true); $message_to_post = getstring2_("chat.status.operator.returned", array($operatorName), $thread['locale'], true);
} }
if ($message_to_post) {
post_message($thread['threadid'], $kind_events, $message_to_post); post_message($thread['threadid'], $kind_events, $message_to_post);
}
post_message($thread['threadid'], $kind_avatar, $operator['vcavatar'] ? $operator['vcavatar'] : ""); post_message($thread['threadid'], $kind_avatar, $operator['vcavatar'] ? $operator['vcavatar'] : "");
} }
} }