summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-11-18 19:37:21 +0000
committerDries Buytaert <dries@buytaert.net>2009-11-18 19:37:21 +0000
commitde137a2dfb838b1d79b458cbc8c0f77eedfb7ea5 (patch)
treed58e40a4b02217982f4a18e3d881d735074afeac /modules
parent6bd1e87a1c318662189b24833f32793962bd0acd (diff)
downloadbrdo-de137a2dfb838b1d79b458cbc8c0f77eedfb7ea5.tar.gz
brdo-de137a2dfb838b1d79b458cbc8c0f77eedfb7ea5.tar.bz2
- Patch #624290 by peximo: improved assumptions about default comment language.
Diffstat (limited to 'modules')
-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 568884747..0d9f9c7ed 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',