/** * Method to show the contents of a draft. * * @access public * @param resource $rpc_conn The connection resource * @param array $auth Array of authentication information (email, password) * @param integer $issue_id The issue ID * @param integer $note_id The sequential id of the draft to view */ function printDraft($rpc_conn, $auth, $issue_id, $draft_id) { Command_Line::checkIssuePermissions(&$rpc_conn, $auth, $issue_id); $draft = Command_Line::getDraft($rpc_conn, $auth, $issue_id, $draft_id); echo sprintf("%15s: %s\n", "Date", $draft["emd_updated_date"]); echo sprintf("%15s: %s\n", "From", $draft["from"]); echo sprintf("%15s: %s\n", "To", $draft["to"]); if (!empty($draft['cc'])) { echo sprintf("%15s: %s\n", "Cc", $draft["cc"]); } echo sprintf("%15s: %s\n", "Title", $draft["emd_subject"]); echo "------------------------------------------------------------------------\n"; echo $draft["emd_body"]; }