File
- modules/comment.module, line 1420
- Enables users to comment on published content.
Code
function _comment_form_submit($form_values) {
if (!isset($form_values['date'])) {
$form_values['date'] = 'now';
}
$form_values['timestamp'] = strtotime($form_values['date']);
if (isset($form_values['author'])) {
$account = user_load(array('name' => $form_values['author']));
$form_values['uid'] = $account->uid;
$form_values['name'] = $form_values['author'];
}
if (trim($form_values['subject']) == '') {
$form_values['subject'] = trim(truncate_utf8(decode_entities(strip_tags(check_markup($form_values['comment'], $form_values['format']))), 29, TRUE));
if ($form_values['subject'] == '') {
$form_values['subject'] = t('(No subject)');
}
}
return $form_values;
}
Login or
register to post comments