Projet

Général

Profil

Révision 7e72b748

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_comment_form.inc
17 17
}
18 18

  
19 19
function ctools_node_comment_form_content_type_render($subtype, $conf, $panel_args, $context) {
20
  $node = isset($context->data) ? clone $context->data : NULL;
20
  if (empty($context->data->nid)) {
21
    return;
22
  }
23
  $node = clone $context->data;
21 24
  $block = new stdClass();
22 25
  $block->module = 'comments';
23 26
  $block->delta  = $node->nid;
24

  
25 27
  $block->title = t('Add comment');
26 28

  
27
  if (empty($node)) {
28
    $block->content = t('Comment form here.');
29
  }
30
  else if ($node->comment == COMMENT_NODE_OPEN) {
29
  if ($node->comment == COMMENT_NODE_OPEN) {
31 30
    if (user_access('post comments')) {
32 31
      $comment = new stdClass();
33 32
      $comment->nid = $node->nid;

Formats disponibles : Unified diff