You are here

public static function CleantalkFuncs::_cleantalk_ct_result in Anti Spam by CleanTalk 8.3

Same name and namespace in other branches
  1. 8.4 src/CleantalkFuncs.php \Drupal\cleantalk\CleantalkFuncs::_cleantalk_ct_result()
  2. 9.1.x src/CleantalkFuncs.php \Drupal\cleantalk\CleantalkFuncs::_cleantalk_ct_result()

Cleantalk inner function - stores spam checking result.

2 calls to CleantalkFuncs::_cleantalk_ct_result()
CleantalkFuncs::_cleantalk_check_spam in src/CleantalkFuncs.php
Cleantalk inner function - performs antispam checking.
cleantalk_comment_presave in ./cleantalk.module
Implements hook_comment_presave().

File

src/CleantalkFuncs.php, line 541

Class

CleantalkFuncs
Cleantalk class create request

Namespace

Drupal\cleantalk

Code

public static function _cleantalk_ct_result($cmd = 'get', $id = '', $allow = 1, $comment = '') {
  static $request_id = '';
  static $result_allow = 1;
  static $result_comment = '';
  if ($cmd == 'set') {
    $request_id = $id;
    $result_allow = $allow;
    $result_comment = $comment;
  }
  else {
    return array(
      'ct_request_id' => $request_id,
      'ct_result_allow' => $result_allow,
      'ct_result_comment' => $result_comment,
    );
  }
}