$topic_ids = trim(urldecode($this->input['topic_ids'])); $topics = $this->topic->topic_by_id($topic_ids, 1); $this->setXmlNode('topic_info', 'topic'); $this->addItem($topics); $this->output(); } /** * 获取单个话题的信息 */ public function detail() { if (isset($this->input['id'])) { $topic_id = intval($this->input['id']); } elseif (isset($this->input['topic_id'])) { $topic_id = intval($this->input['topic_id']); } else { $topic_id = -1; } if ($topic_id < 0) { $this->errorOutput(PARAM_WRONG); } $topic = $this->topic->detail($topic_id, 1); if ($topic['topic_id']) { //获取附件信息 $condition = 'topic_id = ' . $topic_id; $topic['material'] = $this->topic->get_material_info($condition, '');