From a1c7d561b14b419b5b1c78641c2b62e839ab54f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E5=AD=90?= Date: Sat, 15 Nov 2014 11:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E6=96=87=E8=8E=B7=E5=8F=96=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=8E=B7=E5=8F=96=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Action.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Action.php b/Action.php index 321b075..89da646 100644 --- a/Action.php +++ b/Action.php @@ -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);