summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/admin/handlers.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index e3d99cc..68d05c4 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -1050,8 +1050,16 @@ func editHandler(res http.ResponseWriter, req *http.Request) {
host := req.URL.Host
path := req.URL.Path
sid := fmt.Sprintf("%d", id)
- desURL := scheme + host + path + "?type=" + t + "&id=" + sid
- http.Redirect(res, req, desURL, http.StatusFound)
+ if strings.Contains(t, "_") {
+ t = strings.Split(t, "_")[0]
+ }
+ redir := scheme + host + path + "?type=" + t + "&id=" + sid
+
+ if req.URL.Query().Get("status") == "pending" {
+ redir += redir + "&status=pending"
+ }
+
+ http.Redirect(res, req, redir, http.StatusFound)
default:
res.WriteHeader(http.StatusMethodNotAllowed)