Skip to content

Commit

Permalink
revert old submittime detect
Browse files Browse the repository at this point in the history
  • Loading branch information
davydov committed Jun 27, 2019
1 parent 1e95918 commit eebbda7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cleantalkMod.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,6 @@ function cleantalk_cookies_set() {
'check_value' => cleantalk_get_api_key(),
);

// Submit time
$ct_timestamp = time();
setcookie('ct_timestamp', $ct_timestamp, 0, '/');
$cookie_test_value['cookies_names'][] = 'ct_timestamp';
$cookie_test_value['check_value'] .= $ct_timestamp;

// Pervious referer
if(!empty($_SERVER['HTTP_REFERER'])){
setcookie('ct_prev_referer', $_SERVER['HTTP_REFERER'], 0, '/');
Expand Down Expand Up @@ -852,8 +846,8 @@ function cleantalk_get_form_submit_time()
{
if (isset($_SESSION['ct_form_start_time']))
return time() - intval($_SESSION['ct_form_start_time']);
elseif (isset($_COOKIE['ct_timestamp']))
return time() - intval($_COOKIE['ct_timestamp']);
elseif (isset($_COOKIE['ct_ps_timestamp']))
return time() - intval($_COOKIE['ct_ps_timestamp']);
}
return null;
}
Expand Down

0 comments on commit eebbda7

Please sign in to comment.