little more cleanup, leave todo where we have unfinished business
Ted Unangst tedu@tedunangst.com
Fri, 04 Oct 2019 16:41:36 -0400
M
hfcs.go
→
hfcs.go
@@ -145,6 +145,7 @@ }
return false } +// todo func matchfilter(h *Honk, filts []*Filter) bool { origin := originate(h.XID) for _, f := range filts {@@ -172,6 +173,7 @@ filts := getfilters(xonk.UserID, filtSkipMedia)
return matchfilter(xonk, filts) } +// todo func unsee(filts []*Filter, h *Honk) string { return "" }
M
web.go
→
web.go
@@ -1252,6 +1252,7 @@ log.Print(err)
} } +// todo func zonkzonk(w http.ResponseWriter, r *http.Request) { userinfo := login.GetUserInfo(r) itsok := r.FormValue("itsok")@@ -1263,28 +1264,6 @@ userinfo.UserID, zonkerid)
filtcache.Clear(userinfo.UserID) http.Redirect(w, r, "/zonkzone", http.StatusSeeOther) return - } - wherefore := r.FormValue("wherefore") - name := r.FormValue("name") - if name == "" { - return - } - switch wherefore { - case "zonker": - case "zomain": - case "zonvoy": - case "zord": - case "zilence": - case "zoggle": - default: - return - } - db := opendatabase() - db.Exec("insert into zonkers (userid, name, wherefore) values (?, ?, ?)", - userinfo.UserID, name, wherefore) - - if wherefore != "zonvoy" { - filtcache.Clear(userinfo.UserID) } http.Redirect(w, r, "/zonkzone", http.StatusSeeOther)