You are here

function _user_delete_comment_save in User Delete 6.2

1 call to _user_delete_comment_save()
_user_delete_comment_mass_update_helper in ./user_delete.module
comment Mass Update - helper function.

File

./user_delete.module, line 949
Provide account cancellation methods and API to provide the same functionalty as Drupal 7 for cancelling accounts.

Code

function _user_delete_comment_save($comment) {
  drupal_write_record('comments', $comment, 'cid');
  foreach (module_implements('comment') as $name) {
    $function = $name . '_comment';
    $result = $function($comment, 'update');
    if (isset($result) && is_array($result)) {
      $return = array_merge($return, $result);
    }
    elseif (isset($result)) {
      $return[] = $result;
    }
  }

  // Add an entry to the watchdog log.
  watchdog('content', 'Comment: updated %subject.', array(
    '%subject' => $comment->subject,
  ), WATCHDOG_NOTICE, l(t('view'), 'node/' . $comment->nid, array(
    'fragment' => 'comment-' . $comment->cid,
  )));
}