| 1 |
<?php |
<?php |
| 2 |
// $Id: comment.module,v 1.803 2009/11/08 10:02:41 webchick Exp $ |
// $Id: comment.module,v 1.804 2009/11/12 06:46:44 dries Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 1635 |
* @see comment_form_submit() |
* @see comment_form_submit() |
| 1636 |
*/ |
*/ |
| 1637 |
function comment_form($form, &$form_state, $comment) { |
function comment_form($form, &$form_state, $comment) { |
| 1638 |
global $user, $language; |
global $user; |
| 1639 |
|
|
| 1640 |
$op = isset($_POST['op']) ? $_POST['op'] : ''; |
$op = isset($_POST['op']) ? $_POST['op'] : ''; |
| 1641 |
$node = node_load($comment->nid); |
$node = node_load($comment->nid); |
| 1642 |
|
$form['#node'] = $node; |
| 1643 |
|
|
| 1644 |
if (!$user->uid && variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) { |
if (!$user->uid && variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) { |
| 1645 |
$form['#attached']['library'][] = array('system', 'cookie'); |
$form['#attached']['library'][] = array('system', 'cookie'); |
| 1852 |
); |
); |
| 1853 |
$form['language'] = array( |
$form['language'] = array( |
| 1854 |
'#type' => 'value', |
'#type' => 'value', |
| 1855 |
'#value' => isset($comment->language) ? $comment->language : $language->language, |
'#value' => isset($comment->language) ? $comment->language : '', |
| 1856 |
); |
); |
| 1857 |
$form['uid'] = array( |
$form['uid'] = array( |
| 1858 |
'#type' => 'value', |
'#type' => 'value', |