summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2009-11-18 19:37:21 (GMT)
committerDries Buytaert2009-11-18 19:37:21 (GMT)
commitde137a2dfb838b1d79b458cbc8c0f77eedfb7ea5 (patch)
treed58e40a4b02217982f4a18e3d881d735074afeac
parent6bd1e87a1c318662189b24833f32793962bd0acd (diff)
- Patch #624290 by peximo: improved assumptions about default comment language.
-rw-r--r--modules/comment/comment.module5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 5688847..0d9f9c7 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1635,10 +1635,11 @@ function comment_get_display_page($cid, $node_type) {
* @see comment_form_submit()
*/
function comment_form($form, &$form_state, $comment) {
- global $user, $language;
+ global $user;
$op = isset($_POST['op']) ? $_POST['op'] : '';
$node = node_load($comment->nid);
+ $form['#node'] = $node;
if (!$user->uid && variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
$form['#attached']['library'][] = array('system', 'cookie');
@@ -1851,7 +1852,7 @@ function comment_form($form, &$form_state, $comment) {
);
$form['language'] = array(
'#type' => 'value',
- '#value' => isset($comment->language) ? $comment->language : $language->language,
+ '#value' => isset($comment->language) ? $comment->language : '',
);
$form['uid'] = array(
'#type' => 'value',