Exemplo n.º 1
0
 public function findByIdArticleInsert($userId, $type, $typeId, $content)
 {
     date_default_timezone_set('Asia/Shanghai');
     $addTime = date('Y-m-d H:i:s', time());
     $comment = new Comment();
     $comment->userId = $userId;
     $comment->type = $type;
     $comment->typeId = $typeId;
     $comment->content = $content;
     $comment->publishTime = $addTime;
     $comment->status = widgets\GlobalArray::$commentStatusConstantArray['PendingAudit'];
     $comment->insert();
 }