From 297c77d59388222304f8bcb8aad255bdbff49958 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 6 Jan 2014 00:52:14 +0800 Subject: [PATCH] fix #162 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正由于没有判断类别导致将没有文章的分类删除的bug --- var/Widget/Abstract/Metas.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/Widget/Abstract/Metas.php b/var/Widget/Abstract/Metas.php index 8b169a44..efaee62c 100644 --- a/var/Widget/Abstract/Metas.php +++ b/var/Widget/Abstract/Metas.php @@ -245,7 +245,7 @@ class Widget_Abstract_Metas extends Widget_Abstract { // 取出count为0的标签 $tags = Typecho_Common::arrayFlatten($this->db->fetchAll($this->db->select('mid') - ->from('table.metas')->where('count = ?', 0)), 'mid'); + ->from('table.metas')->where('type = ? AND count = ?', 'tags', 0)), 'mid'); foreach ($tags as $tag) { // 确认是否已经没有关联了