function guestbook_form_comment_form_submit in Guestbook 7.2
Same name and namespace in other branches
- 5.2 guestbook.module \guestbook_form_comment_form_submit()
- 5 guestbook.module \guestbook_form_comment_form_submit()
- 6.2 guestbook.module \guestbook_form_comment_form_submit()
- 6 guestbook.module \guestbook_form_comment_form_submit()
File
- ./
guestbook.module, line 843
Code
function guestbook_form_comment_form_submit($form, &$form_state) {
global $user;
if (_guestbook_access('moderate', $form_state['values']['uid'])) {
db_update('guestbook')
->fields(array(
'comment' => $form_state['values']['comment']['value'],
'commentauthor' => $user->uid,
'comment_format' => $form_state['values']['comment']['format'],
))
->condition('id', $form_state['values']['entry_id'])
->execute();
cache_clear_all();
}
}