You are here

public function MigrateDestinationPrivateMsg::rollback in Migrate Extras 7.2

Same name and namespace in other branches
  1. 6.2 privatemsg.inc \MigrateDestinationPrivatemsg::rollback()

Mark provided message as deleted.

Parameters

$id: IDs to be deleted.

File

./privatemsg.inc, line 74
Privatemag module integration

Class

MigrateDestinationPrivateMsg
@file Privatemag module integration

Code

public function rollback(array $id) {
  migrate_instrument_start(__METHOD__);

  // Delete recipients of the message.
  db_delete('pm_index')
    ->condition('mid', reset($id))
    ->execute();

  // Delete message itself.
  db_delete('pm_message')
    ->condition('mid', reset($id))
    ->execute();
  migrate_instrument_stop(__METHOD__);
}