You are here

function comment_upload_project_issue_json_alter in Comment Upload 6

File

./comment_upload.module, line 200
Provides file attachment functionality for comments.

Code

function comment_upload_project_issue_json_alter(&$issue_json) {
  $result = comment_upload_fetch_all($issue_json['id'], FALSE);
  while ($row = db_fetch_object($result)) {
    $issue_json['attachments'][$row->cid]['contributorId'] = $row->uid;
    $issue_json['attachments'][$row->cid]['commentId'] = $row->cid;
    $issue_json['attachments'][$row->cid]['urls'][$row->fid] = file_create_url($row->filepath);
  }
}