better handling of attachments during edit
This commit is contained in:
parent
49e944d8d2
commit
aa0c99ae68
|
@ -713,6 +713,8 @@ func xonkxonk(user *WhatAbout, item junk.Junk, origin string) *Honk {
|
||||||
prev.Noise = xonk.Noise
|
prev.Noise = xonk.Noise
|
||||||
prev.Precis = xonk.Precis
|
prev.Precis = xonk.Precis
|
||||||
prev.Date = xonk.Date
|
prev.Date = xonk.Date
|
||||||
|
prev.Donks = xonk.Donks
|
||||||
|
prev.Onts = xonk.Onts
|
||||||
updatehonk(prev)
|
updatehonk(prev)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
4
web.go
4
web.go
|
@ -847,6 +847,7 @@ func edithonkpage(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
honks := []*Honk{honk}
|
honks := []*Honk{honk}
|
||||||
|
donksforhonks(honks)
|
||||||
reverbolate(u.UserID, honks)
|
reverbolate(u.UserID, honks)
|
||||||
templinfo := getInfo(r)
|
templinfo := getInfo(r)
|
||||||
templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)
|
templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)
|
||||||
|
@ -854,6 +855,9 @@ func edithonkpage(w http.ResponseWriter, r *http.Request) {
|
||||||
templinfo["Noise"] = noise
|
templinfo["Noise"] = noise
|
||||||
templinfo["ServerMessage"] = "honk edit"
|
templinfo["ServerMessage"] = "honk edit"
|
||||||
templinfo["UpdateXID"] = honk.XID
|
templinfo["UpdateXID"] = honk.XID
|
||||||
|
if len(honk.Donks) > 0 {
|
||||||
|
templinfo["SavedFile"] = honk.Donks[0].XID
|
||||||
|
}
|
||||||
err := readviews.Execute(w, "honkpage.html", templinfo)
|
err := readviews.Execute(w, "honkpage.html", templinfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
|
|
Loading…
Reference in New Issue