Projet

Général

Profil

Révision 7547bb19

Ajouté par Assos Assos il y a environ 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/captcha/captcha.inc
39 39
    db_delete('captcha_points')->condition('form_id', $form_id)->execute();
40 40
  }
41 41
  // Handle a captcha_type object.
42
  elseif (is_object($captcha_type) && isset($captcha_type->module) && isset($captcha_type->captcha_type)) {
42
  elseif (is_object($captcha_type) && !empty($captcha_type->module) && !empty($captcha_type->captcha_type)) {
43 43
    db_merge('captcha_points')
44 44
      ->key(array('form_id' => $form_id))
45 45
      ->fields(array('module' => $captcha_type->module, 'captcha_type' => $captcha_type->captcha_type))
......
104 104
  if (!$captcha_point) {
105 105
    $captcha_point = NULL;
106 106
  }
107
  elseif ($captcha_point->captcha_type == 'default') {
107
  elseif (!empty($captcha_point->captcha_type) && $captcha_point->captcha_type == 'default') {
108 108
    if (!$symbolic) {
109 109
      list($module, $type) = explode('/', variable_get('captcha_default_challenge', 'captcha/Math'));
110 110
      $captcha_point->module = $module;
......
114 114
      $captcha_point = 'default';
115 115
    }
116 116
  }
117
  elseif ($captcha_point->module == NULL && $captcha_point->captcha_type == NULL && $symbolic) {
117
  elseif (empty($captcha_point->module) && empty($captcha_point->captcha_type) && $symbolic) {
118 118
    $captcha_point = 'none';
119 119
  }
120 120
  elseif ($symbolic) {
121 121
    $captcha_point = $captcha_point->module . '/' . $captcha_point->captcha_type;
122 122
  }
123

  
123 124
  return $captcha_point;
124 125
}
125 126

  

Formats disponibles : Unified diff