You are here

function _cloudflare_whitelist_comment in CloudFlare 6

Same name and namespace in other branches
  1. 7 cloudflare.module \_cloudflare_whitelist_comment()
1 call to _cloudflare_whitelist_comment()
cloudflare_form_comment_admin_overview_alter in ./cloudflare.module
Implementation of hook_form_FORM_ID_alter().

File

./cloudflare.module, line 146

Code

function _cloudflare_whitelist_comment($cid, $publishcid = FALSE) {
  $ip = _get_ip_address_from_comment($cid);
  if (_cloudflare_whitelist_ip($ip) == "OK" && $publishcid) {

    // only publish the comment if action returned true.
    _cloudflare_publish_comment($cid);
  }
}