You are here

function _cleantalk_ct_result in Anti Spam by CleanTalk 8

Same name and namespace in other branches
  1. 7 cleantalk.module \_cleantalk_ct_result()
  2. 7.2 cleantalk.module \_cleantalk_ct_result()

Cleantalk inner function - stores spam checking result.

5 calls to _cleantalk_ct_result()
cleantalk_comment_insert in ./cleantalk.module
Implements hook_comment_insert().
cleantalk_comment_presave in ./cleantalk.module
Implements hook_comment_presave().
cleantalk_user_insert in ./cleantalk.module
Implements hook_user_insert().
cleantalk_user_presave in ./cleantalk.module
Implements hook_user_presave().
_cleantalk_check_spam in ./cleantalk.module
Cleantalk inner function - performs antispam checking.

File

./cleantalk.module, line 977
Main CleanTalk integration module functions.

Code

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