public static function getCommentById($core, $get) { if (empty($get['id'])) { throw new Exception('No comment ID'); } $rs = $core->blog->getComments(array('comment_id' => (int) $get['id'])); if ($rs->isEmpty()) { throw new Exception('No comment for this ID'); } $rsp = new xmlTag('post'); $rsp->id = $rs->comment_id; $rsp->comment_dt($rs->comment_dt); $rsp->comment_upddt($rs->comment_upddt); $rsp->comment_author($rs->comment_author); $rsp->comment_site($rs->comment_site); $rsp->comment_content($rs->comment_content); $rsp->comment_trackback($rs->comment_trackback); $rsp->comment_status($rs->comment_status); $rsp->post_title($rs->post_title); $rsp->post_url($rs->post_url); $rsp->post_id($rs->post_id); $rsp->post_dt($rs->post_dt); $rsp->user_id($rs->user_id); $rsp->comment_display_content($rs->getContent(true)); if ($core->auth->userID()) { $rsp->comment_ip($rs->comment_ip); $rsp->comment_email($rs->comment_email); $rsp->comment_spam_disp(dcAntispam::statusMessage($rs)); } return $rsp; }