You are here

function comment_migrate_delete_comment in Migrate 6

Implementation of hook_migrate_delete_comment().

File

modules/comment.migrate.inc, line 44
Implementation of comment destination handling

Code

function comment_migrate_delete_comment($tblinfo, $cid) {
  $path = drupal_get_path('module', 'comment') . '/comment.admin.inc';
  include_once $path;

  // Backdoor deletion - query stolen from comment_delete()
  $form = array();
  $form_state = array();
  $form['#comment'] = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid
     FROM {comments} c
     INNER JOIN {users} u ON u.uid = c.uid
     WHERE c.cid = %d', $cid));
  comment_confirm_delete_submit($form, $form_state);
}