From c25be85d052b8aafee8e42cfa966aeb27d5dd501 Mon Sep 17 00:00:00 2001 From: davydovct Date: Fri, 13 Apr 2018 16:34:45 +0500 Subject: [PATCH] subject checking --- cleantalkMod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cleantalkMod.php b/cleantalkMod.php index cc4d81c..2cac4e9 100644 --- a/cleantalkMod.php +++ b/cleantalkMod.php @@ -471,7 +471,6 @@ function cleantalk_check_message(&$msgOptions, $topicOptions, $posterOptions){ if (SMF == 'SSI') { return; } - // Do not check admin if(!$user_info['is_admin']){ @@ -495,7 +494,8 @@ function cleantalk_check_message(&$msgOptions, $topicOptions, $posterOptions){ $ct_request->sender_ip = $ct->cleantalk_get_real_ip(); $ct_request->sender_nickname = isset($posterOptions['name']) ? $posterOptions['name'] : ''; - $ct_request->message = preg_replace('/\s+/', ' ',str_replace("
", " ", $msgOptions['body'])); + $ct_request->message = isset($msgOptions['subject']) ? preg_replace('/\s+/', ' ',str_replace("
", " ", $msgOptions['subject']))."\n".preg_replace('/\s+/', ' ',str_replace("
", " ", $msgOptions['body'])) : preg_replace('/\s+/', ' ',str_replace("
", " ", $msgOptions['body'])); + $ct_request->submit_time = cleantalk_get_form_submit_time();