Commit e9353227 authored by git's avatar git Committed by elachlan

Issue #2887225 by arunkumark, Mithun S, jayesh_makwana, chishah92, Sivaprasad...

Issue #2887225 by arunkumark, Mithun S, jayesh_makwana, chishah92, Sivaprasad C, andrey.troeglazov, elachlan: Coding Standard issues
parent 0941dc7a
...@@ -311,18 +311,18 @@ function image_captcha_after_build_process($element) { ...@@ -311,18 +311,18 @@ function image_captcha_after_build_process($element) {
$form_id = $element['#captcha_info']['form_id']; $form_id = $element['#captcha_info']['form_id'];
$captcha_point = captcha_get_form_id_setting($form_id); $captcha_point = captcha_get_form_id_setting($form_id);
$is_image_captcha = false; $is_image_captcha = FALSE;
if(isset($captcha_point->captchaType) && $captcha_point->captchaType == 'image_captcha/Image'){ if (isset($captcha_point->captchaType) && $captcha_point->captchaType == 'image_captcha/Image') {
$is_image_captcha = true; $is_image_captcha = TRUE;
} }
else if(isset($captcha_point->captchaType) && $captcha_point->captchaType == 'default'){ elseif (isset($captcha_point->captchaType) && $captcha_point->captchaType == 'default') {
$default_challenge = \Drupal::service('config.manager') $default_challenge = \Drupal::service('config.manager')
->getConfigFactory() ->getConfigFactory()
->get('captcha.settings') ->get('captcha.settings')
->get('default_challenge'); ->get('default_challenge');
if ($default_challenge == 'image_captcha/Image') { if ($default_challenge == 'image_captcha/Image') {
$is_image_captcha = true; $is_image_captcha = TRUE;
} }
} }
if ($is_image_captcha && isset($element['captcha_widgets']['captcha_image'])) { if ($is_image_captcha && isset($element['captcha_widgets']['captcha_image'])) {
......
<?php <?php
/*
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Drupal\image_captcha\Controller; namespace Drupal\image_captcha\Controller;
/**
* To change template file, choose Tools | Templates and open it in the editor.
*/
use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Database\Database; use Drupal\Core\Database\Database;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment