mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-21 21:27:15 +00:00
only override commentsort on post page. fixes #107
This commit is contained in:
parent
9775db753f
commit
0c9f2df5fd
|
@ -630,6 +630,9 @@ func GetPost(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||||
Render(w, "block.html", state)
|
Render(w, "block.html", state)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(m["sort"]) > 0 {
|
||||||
|
state.CommentSort = m["sort"][0]
|
||||||
|
}
|
||||||
state.GetComments()
|
state.GetComments()
|
||||||
Render(w, "index.html", state)
|
Render(w, "index.html", state)
|
||||||
}
|
}
|
||||||
|
|
1
state.go
1
state.go
|
@ -220,7 +220,6 @@ func (state *State) ParseQuery(RawQuery string) {
|
||||||
}
|
}
|
||||||
if len(m["sort"]) > 0 {
|
if len(m["sort"]) > 0 {
|
||||||
state.Sort = m["sort"][0]
|
state.Sort = m["sort"][0]
|
||||||
state.CommentSort = m["sort"][0]
|
|
||||||
}
|
}
|
||||||
if len(m["communityname"]) > 0 {
|
if len(m["communityname"]) > 0 {
|
||||||
state.CommunityName = m["communityname"][0]
|
state.CommunityName = m["communityname"][0]
|
||||||
|
|
Loading…
Reference in a new issue