/** * 得到新的邀请通知数 * * @param unknown_type $userid 被邀请的用户ID * @param unknown_type $start * @param unknown_type $length * @param unknown_type $type */ public function inviteList($userid, $start = 0, $length = 0, $type = 'list') { $bug = new Model_Bug(); $where = array('ivtuserid' => $userid); // 得到记录数 if ($type == 'count') { return $this->db->count($this->inviteTable, $where); } // 取记录数 $result = array(); $lists = $this->db->select('*', $this->inviteTable, $where, 'isread asc,inviteid desc', "{$start},{$length}"); foreach ($lists as $row) { $bugInfo = $bug->bugInfo($row['bugid']); $row['subject'] = $bugInfo['subject']; $result[] = $row; } return $result; }
public function deleteAction() { $bugModel = new Model_Bug(); $id = $this->_request->getParam('id'); $bugModel->deleteBug($id); return $this->_forward('list'); }