Projet

Général

Profil

Révision 8916d7ec

Ajouté par Assos Assos il y a plus de 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/webform_validation/webform_validation.module
191 191
      }
192 192
      $rule['sid'] = $sid;
193 193
      // Have the submitted values validated.
194
      $errors = module_invoke_all("webform_validation_validate", $rule['validator'], webform_validation_prefix_keys($items), webform_validation_prefix_keys($node->webform['components']), $rule);
194
      $components = webform_validation_prefix_keys($node->webform['components']);
195
      // Allow translation for all components item names if available.
196
      if (module_exists('webform_localization')) {
197
        module_load_include('inc', 'webform_localization', 'includes/webform_localization.i18n');
198
        foreach ($components as &$component) {
199
          $dummy_element = array(
200
            '#title' => '',
201
          );
202
          _webform_localization_translate_component($dummy_element, $component);
203
          if (isset($dummy_element['#title']) && (string) $dummy_element['#title']) {
204
            $component['name'] = $dummy_element['#title'];
205
          }
206
        }
207
      }
208

  
209
      $errors = module_invoke_all("webform_validation_validate", $rule['validator'], webform_validation_prefix_keys($items), $components, $rule);
195 210
      if ($errors) {
196 211
        $errors = webform_validation_unprefix_keys($errors);
197 212
        // Create hook_webform_validation_validate_alter(). Allow other modules
......
540 555
 * Implements hook_uuid_node_features_export_alter().
541 556
 */
542 557
function webform_validation_uuid_node_features_export_alter(&$data, $node, $module) {
543
  $nid = reset(entity_get_id_by_uuid('node', array($node->uuid)));
558
  $nid = entity_get_id_by_uuid('node', array($node->uuid));
559
  $nid = reset($nid);
544 560
  if (webform_validation_get_node_rules($nid)) {
545 561
    $data['dependencies']['webform_validation'] = 'webform_validation';
546 562
  }

Formats disponibles : Unified diff