From b82a1c1162a9e64f6c0924db7acaf6fe91f66aaa Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 5 May 2016 14:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=95=B0=E7=9A=84=E4=B8=80=E4=B8=AABUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 1d7e94c06..9a72bb4df 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -125,7 +125,7 @@ class BoardsController < ApplicationController if @order.to_i == 2 @type = 2 @topics.each do |topic| - topic[:infocount] = get_praise_num(topic) + (topic.parent ? x.parent.children.count : topic.children.count) + topic[:infocount] = get_praise_num(topic) + (topic.parent ? topic.parent.children.count : topic.children.count) if topic[:infocount] < 0 topic[:infocount] = 0 end