From 7d2a91ab9a642a596c459a0bc2c5e2f5f92dedf4 Mon Sep 17 00:00:00 2001 From: falcon4fun Date: Sun, 6 Oct 2013 12:35:36 +0300 Subject: [PATCH] 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. --- src/mibew/libs/chat.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mibew/libs/chat.php b/src/mibew/libs/chat.php index e086c448..9cc30ea3 100644 --- a/src/mibew/libs/chat.php +++ b/src/mibew/libs/chat.php @@ -707,7 +707,9 @@ function check_for_reassign($thread, $operator) $message_to_post = getstring2_("chat.status.operator.returned", array($operatorName), $thread['locale'], true); } - post_message($thread['threadid'], $kind_events, $message_to_post); + if ($message_to_post) { + post_message($thread['threadid'], $kind_events, $message_to_post); + } post_message($thread['threadid'], $kind_avatar, $operator['vcavatar'] ? $operator['vcavatar'] : ""); } }