EclipseGc

Untitled

May 21st, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1. if (!empty($comment->cid) && !isset($comment->original)) {
  2.       $comment->original = entity_load_unchanged('comment', $comment->cid);
  3.       // If a term id was given, but no entity was loaded, create a new stub term
  4.       // to update later.
  5.       if (!$comment->original) {
  6.         $cid = db_insert('comment')
  7.           ->fields(array(
  8.             'cid' => $comment->cid,
  9.             'pid' => $comment->pid,
  10.             'nid' => $comment->nid,
  11.             'uid' => $comment->uid,
  12.             'subject' => $comment->subject,
  13.             'hostname' => $comment->hostname,
  14.             'created' => $comment->created,
  15.             'changed' => isset($comment->changed) ? $comment->changed : $comment->created,
  16.             'status' => $comment->status,
  17.             'thread' => $comment->thread,
  18.             'language' => $comment->language,
  19.           ))
  20.           ->execute();
  21.       }
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment