Projet

Général

Profil

Révision 66b5cbf6

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/captcha/captcha.inc
69 69
 *   or in the form 'captcha/Math'.
70 70
 */
71 71
function captcha_get_form_id_setting($form_id, $symbolic=FALSE) {
72
  // Fetch setting from database.
72 73
  $result = db_query("SELECT module, captcha_type FROM {captcha_points} WHERE form_id = :form_id",
73 74
    array(':form_id' =>  $form_id));
74 75
  $captcha_point = $result->fetchObject();
76

  
77
  // If no setting is available in database for the given form,
78
  // but 'captcha_default_challenge_on_nonlisted_forms' is enabled, pick the default type anyway
79
  if (!$captcha_point && variable_get('captcha_default_challenge_on_nonlisted_forms', FALSE))
80
  {
81
    $captcha_point = (object) array('captcha_type' => 'default');
82
  }
83

  
84
  // Handle (default) settings and symbolic mode.
75 85
  if (!$captcha_point) {
76 86
    $captcha_point = NULL;
77 87
  }

Formats disponibles : Unified diff