Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!empty($comment->cid) && !isset($comment->original)) {
- $comment->original = entity_load_unchanged('comment', $comment->cid);
- // If a term id was given, but no entity was loaded, create a new stub term
- // to update later.
- if (!$comment->original) {
- $cid = db_insert('comment')
- ->fields(array(
- 'cid' => $comment->cid,
- 'pid' => $comment->pid,
- 'nid' => $comment->nid,
- 'uid' => $comment->uid,
- 'subject' => $comment->subject,
- 'hostname' => $comment->hostname,
- 'created' => $comment->created,
- 'changed' => isset($comment->changed) ? $comment->changed : $comment->created,
- 'status' => $comment->status,
- 'thread' => $comment->thread,
- 'language' => $comment->language,
- ))
- ->execute();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment