You are here

protected function BotchaRecipeUsingJsAbstract::getFieldDefault in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.2 controller/botcha_recipe.controller.inc \BotchaRecipeUsingJsAbstract::getFieldDefault()
  2. 6.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeUsingJsAbstract::getFieldDefault()
  3. 7.2 controller/botcha_recipe.controller.inc \BotchaRecipeUsingJsAbstract::getFieldDefault()

What server sends to JS in the field.

Return value

string

1 call to BotchaRecipeUsingJsAbstract::getFieldDefault()
BotchaRecipeUsingJsAbstract::getJsMatch in controller/recipe/botcha.recipe.controller.inc
What JS matches in the field.

File

controller/recipe/botcha.recipe.controller.inc, line 538
Controller layer of the BotchaRecipe objects.

Class

BotchaRecipeUsingJsAbstract

Code

protected function getFieldDefault($delta) {
  $fields = $this
    ->getProperty($this->settings['fields'], 'getFields');
  $js = $this
    ->getProperty($this->settings['js'], 'getJs');
  $field_prefix = $fields[$delta]['prefix'];
  $chops_positions = array_keys($js['chops']);
  $secure_token = $js['secure_token'];
  return $field_prefix . substr($secure_token, $chops_positions[0], $chops_positions[1]);
}