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_comments.inc
20 20
}
21 21

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

  
28 30
  $block->title = t('Comments');
29
  if (empty($node)) {
30
    $block->content = t('Node comments go here.');
31
  }
32
  else if ($node->comment) {
31

  
32
  if ($node->comment) {
33 33
    $block->content = ctools_comment_render($node, $conf);
34
    // Update the history table, stating that this user viewed this node.
35
    node_tag_new($node);
36 34
  }
37 35

  
38 36
  return $block;

Formats disponibles : Unified diff