Skip to content

Commit

Permalink
Merge pull request #16 from znaeff/master
Browse files Browse the repository at this point in the history
Added values to sender_info.
  • Loading branch information
CleanTalk committed May 12, 2016
2 parents 16eea2a + c0795e5 commit a9456ad
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Antispam.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,13 @@ public static function onEditFilter ( $editor, $text, $section, &$error, $summa
$ctRequest->sender_ip = $wgRequest->getIP();
$ctRequest->js_on = CTBody::JSTest();
$ctRequest->submit_time = CTBody::SubmitTimeTest();
$ctRequest->sender_info=json_encode(Array('page_url'=>htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI'])));
$ctRequest->sender_info=json_encode(
Array(
'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
'REFFERRER' => $_SERVER['HTTP_REFERER'],
'USER_AGENT' => $_SERVER['HTTP_USER_AGENT'],
)
);

$ct = new Cleantalk();
$ct->server_url = $wgCTServerURL;
Expand Down Expand Up @@ -231,7 +237,13 @@ public static function onAbortNewAccount ( $user, &$message ) {
$ctRequest->sender_ip = $wgRequest->getIP();
$ctRequest->js_on = CTBody::JSTest();
$ctRequest->submit_time = CTBody::SubmitTimeTest();
$ctRequest->sender_info=json_encode(Array('page_url'=>htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI'])));
$ctRequest->sender_info=json_encode(
Array(
'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
'REFFERRER' => $_SERVER['HTTP_REFERER'],
'USER_AGENT' => $_SERVER['HTTP_USER_AGENT'],
)
);

$ct = new Cleantalk();
$ct->server_url = $wgCTServerURL;
Expand Down

0 comments on commit a9456ad

Please sign in to comment.