we don't use pFrag in topic replies

This commit is contained in:
Azareal 2020-04-28 08:23:21 +10:00
parent 46a87defee
commit 5b0fcd91d1
2 changed files with 4 additions and 4 deletions

View File

@ -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 // 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 likedMap, attachMap map[int]int
var likedQueryList, attachQueryList []int var likedQueryList, attachQueryList []int

View File

@ -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... // Get the replies if we have any...
if topic.PostCount > 0 { if topic.PostCount > 0 {
var pFrag int /*var pFrag int
if strings.HasPrefix(r.URL.Fragment, "post-") { if strings.HasPrefix(r.URL.Fragment, "post-") {
pFrag, _ = strconv.Atoi(strings.TrimPrefix(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 { 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) 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 { } else if err != nil {