From eaa7d288232c627db10c1621fa7b1b38879da5d6 Mon Sep 17 00:00:00 2001 From: joyqi Date: Thu, 28 Sep 2017 13:05:51 +0800 Subject: [PATCH] fix #610 --- var/Widget/Feedback.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/Widget/Feedback.php b/var/Widget/Feedback.php index 21e8de39..57d2e7e6 100644 --- a/var/Widget/Feedback.php +++ b/var/Widget/Feedback.php @@ -313,9 +313,10 @@ class Widget_Feedback extends Widget_Abstract_Comments implements Widget_Interfa /** 检查ip评论间隔 */ if (!$this->user->pass('editor', true) && $this->_content->authorId != $this->user->uid && - $this->options->commentsPostIntervalEnable) { + $this->options->commentsPostIntervalEnable) { + $latestComment = $this->db->fetchRow($this->db->select('created')->from('table.comments') - ->where('cid = ?', $this->_content->cid) + ->where('cid = ? AND ip = ?', $this->_content->cid, $this->request->getIp()) ->order('created', Typecho_Db::SORT_DESC) ->limit(1));