diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-16 03:40:40 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-16 03:40:40 +0000 |
commit | 92f5a844b25e7855691a9338f9466e8f5c9a07af (patch) | |
tree | 2f818e9071c7e1872bb507737fc112dd244f9896 /modules/comment/comment.module | |
parent | 087a47ba5c8cdf5b0f79d9a121b7b9dcbbe7e992 (diff) | |
download | brdo-92f5a844b25e7855691a9338f9466e8f5c9a07af.tar.gz brdo-92f5a844b25e7855691a9338f9466e8f5c9a07af.tar.bz2 |
#605862 by andypost, peximo, sun: Store language for comments.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index db36e0a7a..266b35499 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1289,6 +1289,7 @@ function comment_save($comment) { 'name' => $comment->name, 'mail' => $comment->mail, 'homepage' => $comment->homepage, + 'language' => $comment->language, )) ->condition('cid', $comment->cid) ->execute(); @@ -1368,6 +1369,7 @@ function comment_save($comment) { 'name' => $comment->name, 'mail' => $comment->mail, 'homepage' => $comment->homepage, + 'language' => $comment->language, )) ->execute(); @@ -1641,7 +1643,7 @@ function comment_get_display_page($cid, $node_type) { * @see comment_form_submit() */ function comment_form($form, &$form_state, $comment) { - global $user; + global $user, $language; $op = isset($_POST['op']) ? $_POST['op'] : ''; $node = node_load($comment->nid); @@ -1855,6 +1857,10 @@ function comment_form($form, &$form_state, $comment) { '#type' => 'value', '#value' => $comment->nid, ); + $form['language'] = array( + '#type' => 'value', + '#value' => isset($comment->language) ? $comment->language : $language->language, + ); $form['uid'] = array( '#type' => 'value', '#value' => !empty($comment->uid) ? $comment->uid : 0, |