protected function getCommentList($data) { $res = array('list' => array(), 'count' => 0); $list = array(); $comments = DzPortalComment::getComments($data['id'], $data['idType'], $data['page'], $data['pageSize']); foreach ($comments as $comment) { $tmpComment = array(); $tmpComment['managePanel'] = array(array('type' => 'quote', 'action' => '', 'title' => WebUtils::t('引用'))); $tmpComment['id'] = (int) $comment['cid']; $tmpComment['uid'] = (int) $comment['uid']; $tmpComment['username'] = $comment['username']; $tmpComment['avatar'] = UserUtils::getUserAvatar($comment['uid']); $tmpComment['time'] = date('Y-m-d H:i', $comment['dateline']); $tmpComment['content'] = $this->transCommentMessage($comment['message']); $list[] = $tmpComment; } $res['list'] = $list; $res['count'] = DzPortalComment::getCount($data['id'], $data['idType']); return $res; }