You are here

function fb_admin_application_delete_form_submit in Drupal for Facebook 7.4

Execute node deletion

File

./fb.admin.inc, line 1118

Code

function fb_admin_application_delete_form_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $fb_app = $form['#fb_app'];

    // @TODO: invoke hooks so that third-party modules may act.
    db_delete('fb_token')
      ->condition('fba', $fb_app['id'])
      ->execute();
    db_delete('fb_application')
      ->condition('fba', $fb_app['id'])
      ->execute();
  }
  $form_state['redirect'] = FB_PATH_ADMIN_APPS;
}