summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/html.c b/html.c
index 6c7af51..b27db7a 100644
--- a/html.c
+++ b/html.c
@@ -3149,6 +3149,8 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c
3149 xs_html_tag("summary", 3149 xs_html_tag("summary",
3150 xs_html_text("...")))); 3150 xs_html_text("..."))));
3151 3151
3152 xs *redir = xs_fmt("%s/people", user->actor);
3153
3152 const char *actor_id; 3154 const char *actor_id;
3153 3155
3154 xs_list_foreach(list, actor_id) { 3156 xs_list_foreach(list, actor_id) {
@@ -3202,6 +3204,10 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c
3202 xs_html_attr("value", actor_id)), 3204 xs_html_attr("value", actor_id)),
3203 xs_html_sctag("input", 3205 xs_html_sctag("input",
3204 xs_html_attr("type", "hidden"), 3206 xs_html_attr("type", "hidden"),
3207 xs_html_attr("name", "hard-redir"),
3208 xs_html_attr("value", redir)),
3209 xs_html_sctag("input",
3210 xs_html_attr("type", "hidden"),
3205 xs_html_attr("name", "actor-form"), 3211 xs_html_attr("name", "actor-form"),
3206 xs_html_attr("value", "yes"))); 3212 xs_html_attr("value", "yes")));
3207 3213
@@ -5003,12 +5009,19 @@ int html_post_handler(const xs_dict *req, const char *q_path,
5003 } 5009 }
5004 5010
5005 if (status == HTTP_STATUS_SEE_OTHER) { 5011 if (status == HTTP_STATUS_SEE_OTHER) {
5006 const char *redir = xs_dict_get(p_vars, "redir"); 5012 const char *hard_redir = xs_dict_get(p_vars, "hard-redir");
5007 5013
5008 if (xs_is_null(redir)) 5014 if (xs_is_string(hard_redir))
5009 redir = "top"; 5015 *body = xs_dup(hard_redir);
5016 else {
5017 const char *redir = xs_dict_get(p_vars, "redir");
5018
5019 if (xs_is_null(redir))
5020 redir = "top";
5021
5022 *body = xs_fmt("%s/admin#%s", snac.actor, redir);
5023 }
5010 5024
5011 *body = xs_fmt("%s/admin#%s", snac.actor, redir);
5012 *b_size = strlen(*body); 5025 *b_size = strlen(*body);
5013 } 5026 }
5014 5027