You are here

function autosave_remove_autosaved_form_submit in Autosave 7.2

Form submit callback to remove the autosaved form when submitting it.

1 string reference to 'autosave_remove_autosaved_form_submit'
autosave_form_alter in ./autosave.module
Implements hook_form_alter().

File

./autosave.module, line 258
Does background saves of node being edited.

Code

function autosave_remove_autosaved_form_submit($form, $form_state) {
  global $user;
  db_delete('autosaved_forms')
    ->condition('form_id', $form['#form_id'])
    ->condition('path', $_POST['autosave_form_path'])
    ->condition('uid', $user->uid)
    ->execute();
}