Skip to content

Commit 63f27ad

Browse files
author
davydov
committed
add review protection
1 parent 9e7b22e commit 63f27ad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

antispambycleantalk.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,12 @@ public function onAfterRoute()
10151015
}
10161016
$post_info['comment_type'] = 'contact_form_joomla_breezing';
10171017
}
1018+
elseif ($app->input->get('option') == 'com_virtuemart' && $app->input->get('task') == 'review')
1019+
{
1020+
$sender_email = JFactory::getUser()->email;
1021+
$sender_nickname = JFactory::getUser()->username;
1022+
$message = isset($_POST['comment']) ? $_POST['comment'] : '';
1023+
}
10181024
// Genertal test for any forms or form with custom fields
10191025
elseif ($config['general_contact_forms_test'] ||
10201026
$config['check_external'] ||
@@ -1035,11 +1041,11 @@ public function onAfterRoute()
10351041
$message = array_merge(array('subject' => $subject), $message);
10361042
$message = implode("\n", $message);
10371043

1038-
if (!isset($post_info['comment_type']))
1039-
$post_info['comment_type'] = 'feedback_general_contact_form';
10401044
}
10411045
if (!$this->exceptionList() && (trim($sender_email) !='' || $config['check_all_post']) && !empty($_POST) && empty($_FILES))
10421046
{
1047+
if (!isset($post_info['comment_type']))
1048+
$post_info['comment_type'] = 'feedback_general_contact_form';
10431049
$ctResponse = self::ctSendRequest(
10441050
'check_message', array(
10451051
'sender_nickname' => $sender_nickname,

0 commit comments

Comments
 (0)