Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_comment_form.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
/** |
|
4 |
* @file |
|
5 |
*/ |
|
6 |
|
|
3 | 7 |
if (module_exists('comment')) { |
4 | 8 |
/** |
5 | 9 |
* Plugins are described by creating a $plugin array which will be used |
... | ... | |
23 | 27 |
$node = clone $context->data; |
24 | 28 |
$block = new stdClass(); |
25 | 29 |
$block->module = 'comments'; |
26 |
$block->delta = $node->nid;
|
|
30 |
$block->delta = $node->nid; |
|
27 | 31 |
$block->title = t('Add comment'); |
28 | 32 |
|
29 | 33 |
if ($node->comment == COMMENT_NODE_OPEN) { |
... | ... | |
42 | 46 |
); |
43 | 47 |
$block->content = drupal_build_form('comment_node_' . $node->type . '_form', $form_state); |
44 | 48 |
} |
45 |
else if (!empty($conf['anon_links'])) {
|
|
49 |
elseif (!empty($conf['anon_links'])) { |
|
46 | 50 |
$block->content = theme('comment_post_forbidden', array('node' => $node)); |
47 | 51 |
} |
48 | 52 |
} |
... | ... | |
75 | 79 |
$form_state['conf'][$key] = $form_state['values'][$key]; |
76 | 80 |
} |
77 | 81 |
} |
78 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules