From 5b0fcd91d12d80f80673ff46f61d0aa8afc27389 Mon Sep 17 00:00:00 2001 From: Azareal Date: Tue, 28 Apr 2020 08:23:21 +1000 Subject: [PATCH] we don't use pFrag in topic replies --- common/topic.go | 2 +- routes/topic.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/topic.go b/common/topic.go index 721aca87..6a0a25db 100644 --- a/common/topic.go +++ b/common/topic.go @@ -732,7 +732,7 @@ func (ru *ReplyUser) Init3(u *User, tu *TopicUser) (group *Group, err error) { } // TODO: Factor TopicUser into a *Topic and *User, as this starting to become overly complicated x.x -func (t *TopicUser) Replies(offset, pFrag int, user *User) (rlist []*ReplyUser /*, ogdesc string*/, err error) { +func (t *TopicUser) Replies(offset int /*pFrag int, */, user *User) (rlist []*ReplyUser /*, ogdesc string*/, err error) { var likedMap, attachMap map[int]int var likedQueryList, attachQueryList []int diff --git a/routes/topic.go b/routes/topic.go index e52d5a1e..0d515e7f 100644 --- a/routes/topic.go +++ b/routes/topic.go @@ -146,11 +146,11 @@ func ViewTopic(w http.ResponseWriter, r *http.Request, user *c.User, header *c.H // Get the replies if we have any... if topic.PostCount > 0 { - var pFrag int + /*var pFrag int if strings.HasPrefix(r.URL.Fragment, "post-") { pFrag, _ = strconv.Atoi(strings.TrimPrefix(r.URL.Fragment, "post-")) - } - rlist, err := topic.Replies(offset, pFrag, user) + }*/ + rlist, err := topic.Replies(offset /* pFrag,*/, user) if err == sql.ErrNoRows { return c.LocalError("Bad Page. Some of the posts may have been deleted or you got here by directly typing in the page number.", w, r, user) } else if err != nil {