function guestbook_form_comment_form_submit in Guestbook 6
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()
- 7.2 guestbook.module \guestbook_form_comment_form_submit()
File
- ./
guestbook.module, line 616
Code
function guestbook_form_comment_form_submit($form, &$form_state) {
global $user;
if (_guestbook_access('administer', $form_state['values']['uid'])) {
db_query("UPDATE {guestbook} SET comment = '%s', commentauthor = %d WHERE id = %d", $form_state['values']['comment'], $user->uid, $form_state['values']['entry_id']);
}
$form_state['redirect'] = array(
guestbook_path($form_state['values']['uid']),
!empty($_GET['page']) ? 'page=' . $_GET['page'] : NULL,
);
}