summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-30 23:14:12 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-30 23:14:12 -0700
commitb1dd82806b8e31ff62d5cbb0612998411a8a1259 (patch)
tree7995e665add99255a9c921ae74edd5e32fb58ac3 /system
parent3016c1e6b38ea845b15571c36257c3137d334d07 (diff)
fixing delete routine when specifier is in the type name
Diffstat (limited to 'system')
-rw-r--r--system/admin/handlers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index d6c3baa..4a0453d 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -1009,6 +1009,12 @@ func deleteHandler(res http.ResponseWriter, req *http.Request) {
return
}
+ // catch specifier suffix from delete form value
+ if strings.Contains(t, "_") {
+ spec := strings.Split(t, "_")
+ t = spec[0]
+ }
+
redir := strings.TrimSuffix(req.URL.Scheme+req.URL.Host+req.URL.Path, "/edit/delete")
redir = redir + "/posts?type=" + t
http.Redirect(res, req, redir, http.StatusFound)