This commit is contained in:
xing 2022-10-19 22:41:44 +08:00
parent b7f76a1ccd
commit f37901f85f

View File

@ -85,7 +85,13 @@ func Detail(c *gin.Context) {
h["post"] = post h["post"] = post
h["showComment"] = showComment h["showComment"] = showComment
h["prev"] = prev h["prev"] = prev
h["comments"] = hh.formatComment(commentss, 1, 5) depth := models.Options["thread_comments_depth"]
d, err := strconv.Atoi(depth)
if err != nil {
logs.ErrPrintln(err, "get comment depth")
d = 5
}
h["comments"] = hh.formatComment(commentss, 1, d)
h["next"] = next h["next"] = next
} }