You are here

function BotchaRecipeObscureUrl::isSpam in BOTCHA Spam Prevention 6.2

Same name and namespace in other branches
  1. 6.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeObscureUrl::isSpam()
  2. 7.2 controller/botcha_recipe.controller.inc \BotchaRecipeObscureUrl::isSpam()
  3. 7.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeObscureUrl::isSpam()

Spam check.

_state

Parameters

type $form:

Overrides BotchaRecipe::isSpam

File

controller/botcha_recipe.controller.inc, line 721
Controller layer of the BotchaRecipe objects.

Class

BotchaRecipeObscureUrl

Code

function isSpam($form, $form_state) {
  $isSpam = parent::isSpam($form, $form_state);
  if (isset($this->url_elements)) {
    foreach ($this->url_elements as $field => $value) {
      $url_field = isset($_GET[$field]) ? $_GET[$field] : FALSE;
      unset($_GET[$field]);
      if (isset($value['!valid_token']) && $url_field !== $value['!valid_token']) {
        $isSpam = TRUE;
        break;
      }
    }
  }
  return $isSpam;
}