/[drupal]/drupal/modules/comment/comment.module
ViewVC logotype

Diff of /drupal/modules/comment/comment.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.801, Fri Nov 6 03:59:06 2009 UTC revision 1.802, Sat Nov 7 13:35:20 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: comment.module,v 1.800 2009/11/03 06:47:22 webchick Exp $  // $Id: comment.module,v 1.801 2009/11/06 03:59:06 webchick Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 794  function comment_build($comment, stdClas Line 794  function comment_build($comment, stdClas
794      '#node' => $node,      '#node' => $node,
795      '#build_mode' => $build_mode,      '#build_mode' => $build_mode,
796    );    );
   // Add contextual links for this comment.  
   $build['#contextual_links']['comment'] = menu_contextual_links('comment', array($comment->cid));  
797    
798    $prefix = '';    $prefix = '';
799    $is_threaded = isset($comment->divs) && variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED) == COMMENT_MODE_THREADED;    $is_threaded = isset($comment->divs) && variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED) == COMMENT_MODE_THREADED;
# Line 819  function comment_build($comment, stdClas Line 817  function comment_build($comment, stdClas
817      $build['#suffix'] = str_repeat('</div>', $comment->divs_final);      $build['#suffix'] = str_repeat('</div>', $comment->divs_final);
818    }    }
819    
820      // Allow modules to modify the structured comment.
821      drupal_alter('comment_build', $build);
822    
823    return $build;    return $build;
824  }  }
825    
# Line 844  function comment_build_content($comment, Line 845  function comment_build_content($comment,
845      '#markup' => check_markup($comment->comment, $comment->format, '', TRUE),      '#markup' => check_markup($comment->comment, $comment->format, '', TRUE),
846    );    );
847    
848      // Build fields content.
849    field_attach_prepare_view('comment', array($comment->cid => $comment), $build_mode);    field_attach_prepare_view('comment', array($comment->cid => $comment), $build_mode);
850    $comment->content += field_attach_view('comment', $comment, $build_mode);    $comment->content += field_attach_view('comment', $comment, $build_mode);
851    
# Line 857  function comment_build_content($comment, Line 859  function comment_build_content($comment,
859    
860    // Allow modules to make their own additions to the comment.    // Allow modules to make their own additions to the comment.
861    module_invoke_all('comment_view', $comment, $build_mode);    module_invoke_all('comment_view', $comment, $build_mode);
   
   // Allow modules to modify the structured comment.  
   drupal_alter('comment_build', $comment, $build_mode);  
862  }  }
863    
864  /**  /**

Legend:
Removed from v.1.801  
changed lines
  Added in v.1.802

  ViewVC Help
Powered by ViewVC 1.1.2