Skip to content

Commit

Permalink
全文获取增加获取标签
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Nov 15, 2014
1 parent be6b345 commit a1c7d56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ private function posts() {
$result = array();
foreach($posts as $post) {
$post = $this->widget("Widget_Abstract_Contents")->push($post);
$post['tag'] = $this->db->fetchAll($this->db->select('name')->from('table.metas')
->join('table.relationships', 'table.metas.mid = table.relationships.mid', Typecho_DB::LEFT_JOIN)
->where('table.relationships.cid = ?', $post['cid'])
->where('table.metas.type = ?', 'tag'));
$result[] = $post;
}
$this->export($result);
Expand Down

0 comments on commit a1c7d56

Please sign in to comment.