You are here

function guestbook_form_comment_form_submit in Guestbook 5

Same name and namespace in other branches
  1. 5.2 guestbook.module \guestbook_form_comment_form_submit()
  2. 6.2 guestbook.module \guestbook_form_comment_form_submit()
  3. 6 guestbook.module \guestbook_form_comment_form_submit()
  4. 7.2 guestbook.module \guestbook_form_comment_form_submit()

File

./guestbook.module, line 582

Code

function guestbook_form_comment_form_submit($form_id, $edit) {
  global $user;
  if (_guestbook_access('administer', $edit['uid'])) {
    db_query("UPDATE {guestbook} SET comment = '%s', commentauthor = %d WHERE id = %d", $edit['comment'], $user->uid, $edit['entry_id']);
  }
  return array(
    'guestbook/' . $edit['uid'],
    $_GET['page'] ? 'page=' . $_GET['page'] : NULL,
  );
}