summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-05 15:05:05 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-05 15:05:05 +0000
commita539b0e00dedddfea36d4a96b788e42923056a78 (patch)
treefcf4876cbfa5abef45c40e134b99bc30944fde14 /modules/comment/comment.module
parent2431df84a2a6afb07a5214ef748cded72ac87947 (diff)
downloadbrdo-a539b0e00dedddfea36d4a96b788e42923056a78.tar.gz
brdo-a539b0e00dedddfea36d4a96b788e42923056a78.tar.bz2
- Patch by #565496 by dropcube, pwolanin: changed Allow dynamic attaching of other types of stuff to render() structures.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index b17d3c71f..3decfdc84 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -590,7 +590,7 @@ function comment_node_page_additions($node) {
$comments = comment_load_multiple($cids);
comment_prepare_thread($comments);
$build = comment_build_multiple($comments);
- $build['#attached_css'][] = drupal_get_path('module', 'comment') . '/comment.css';
+ $build['#attached']['css'][] = drupal_get_path('module', 'comment') . '/comment.css';
$build['pager']['#theme'] = 'pager';
$additions['comments'] = $build;
}
@@ -940,7 +940,9 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
- '#attached_js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
+ '#attached' => array(
+ 'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
+ ),
);
$form['comment']['comment_default_mode'] = array(
'#type' => 'checkbox',
@@ -1006,7 +1008,9 @@ function comment_form_alter(&$form, $form_state, $form_id) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
- '#attached_js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
+ '#attached' => array(
+ 'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
+ ),
'#weight' => 30,
);
$comment_count = isset($node->nid) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() : 0;
@@ -1614,7 +1618,7 @@ function comment_form(&$form_state, $comment) {
$node = node_load($comment->nid);
if (!$user->uid && variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
- $form_state['#attached_js'][] = drupal_get_path('module', 'comment') . '/comment.js';
+ $form_state['#attached']['js'][] = drupal_get_path('module', 'comment') . '/comment.js';
}
$comment = (array) $comment;