mirror of
https://github.com/rystaf/mlmym.git
synced 2024-12-28 11:08:56 +00:00
communities redirect fix
This commit is contained in:
parent
9525c1ff4d
commit
3ce346d815
|
@ -418,7 +418,10 @@ func GetFrontpage(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
|
||||||
|
|
||||||
func GetCommunities(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
func GetCommunities(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||||
r.URL.Path = "/search"
|
r.URL.Path = "/search"
|
||||||
r.URL.RawQuery = "searchtype=Communities"
|
if ps.ByName("host") != "" {
|
||||||
|
r.URL.Path = "/" + ps.ByName("host") + "/search"
|
||||||
|
}
|
||||||
|
r.URL.RawQuery = "searchtype=Communities&sort=TopMonth"
|
||||||
http.Redirect(w, r, r.URL.String(), 301)
|
http.Redirect(w, r, r.URL.String(), 301)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue