Révision 5c451ca3
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/webform_validation/webform_validation.module | ||
---|---|---|
284 | 284 |
} |
285 | 285 |
else { |
286 | 286 |
$title = $validator_info['name']; |
287 |
$component_list_postfix = '; none present in this form';
|
|
287 |
$component_list_postfix = '; ' . t('none present in this form');
|
|
288 | 288 |
} |
289 | 289 |
$item = '<dt>' . $title . '</dt>'; |
290 | 290 |
$item .= '<dd>'; |
291 | 291 |
$item .= $validator_info['description']; |
292 |
$item .= ' Works with: ' . implode(', ', $validator_info['component_types']) . $component_list_postfix . '.</dd>';
|
|
292 |
$item .= ' ' . t('Works with: @component_types.', array('@component_types' => implode(', ', $validator_info['component_types']) . $component_list_postfix)) . '</dd>';
|
|
293 | 293 |
$output .= $item; |
294 | 294 |
} |
295 | 295 |
$output .= '</dl>'; |
... | ... | |
312 | 312 |
* Implements hook_node_insert(). |
313 | 313 |
*/ |
314 | 314 |
function webform_validation_node_insert($node) { |
315 |
if (module_exists('clone')) { |
|
316 |
if (in_array($node->type, webform_variable_get('webform_node_types'))) { |
|
317 |
webform_validation_node_clone($node); |
|
318 |
} |
|
315 |
if (module_exists('clone') && in_array($node->type, webform_variable_get('webform_node_types'))) { |
|
316 |
webform_validation_node_clone($node); |
|
319 | 317 |
} |
320 | 318 |
} |
321 | 319 |
|
... | ... | |
335 | 333 |
* Adds support for node_clone module |
336 | 334 |
*/ |
337 | 335 |
function webform_validation_node_clone($node) { |
336 |
if (!in_array($node->type, webform_variable_get('webform_node_types'))) { |
|
337 |
return; |
|
338 |
} |
|
338 | 339 |
if (isset($node->clone_from_original_nid)) { |
339 | 340 |
$original_nid = $node->clone_from_original_nid; |
340 | 341 |
// Get existing rules for original node |
Formats disponibles : Unified diff
Weekly update of contrib modules