function photos_comment_form_submit in Album Photos 6.2
Same name and namespace in other branches
- 8.4 photos.module \photos_comment_form_submit()
- 7.3 photos.module \photos_comment_form_submit()
1 string reference to 'photos_comment_form_submit'
File
- ./
photos.module, line 626
Code
function photos_comment_form_submit($form, &$form_state) {
if (!$form_state['values']['photos_fid']) {
comment_form_submit($form, $form_state);
}
else {
_comment_form_submit($form_state['values']);
if ($cid = comment_save($form_state['values'])) {
$node = node_load($form_state['values']['nid']);
$page = comment_new_page_count($node->comment_count, 1, $node);
$form_state['redirect'] = array(
'photos/image/' . $form_state['values']['photos_fid'],
$page,
"comment-{$cid}",
);
return;
}
}
}