summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2025-02-14 10:08:26 +0100
committerGravatar default2025-02-14 10:08:26 +0100
commit78bd0263ce56ce8d8544389971daa3d6cdd5c25e (patch)
tree3db5170ef3b1fb545807a772427bdf32660d89b0
parentRedefined L() to use lang_str(). (diff)
downloadsnac2-78bd0263ce56ce8d8544389971daa3d6cdd5c25e.tar.gz
snac2-78bd0263ce56ce8d8544389971daa3d6cdd5c25e.tar.xz
snac2-78bd0263ce56ce8d8544389971daa3d6cdd5c25e.zip
html_footer() now receives an optional snac *user argument.
-rw-r--r--html.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/html.c b/html.c
index f81cab2..6a71035 100644
--- a/html.c
+++ b/html.c
@@ -2585,10 +2585,8 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2585} 2585}
2586 2586
2587 2587
2588xs_html *html_footer(void) 2588xs_html *html_footer(const snac *user)
2589{ 2589{
2590 const snac *user = NULL;
2591
2592 return xs_html_tag("div", 2590 return xs_html_tag("div",
2593 xs_html_attr("class", "snac-footer"), 2591 xs_html_attr("class", "snac-footer"),
2594 xs_html_tag("a", 2592 xs_html_tag("a",
@@ -2895,7 +2893,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
2895 } 2893 }
2896 2894
2897 xs_html_add(body, 2895 xs_html_add(body,
2898 html_footer()); 2896 html_footer(user));
2899 2897
2900 return xs_html_render_s(html, "<!DOCTYPE html>\n"); 2898 return xs_html_render_s(html, "<!DOCTYPE html>\n");
2901} 2899}
@@ -3064,7 +3062,7 @@ xs_str *html_people(snac *user)
3064 html_user_head(user, NULL, NULL), 3062 html_user_head(user, NULL, NULL),
3065 xs_html_add(html_user_body(user, 0), 3063 xs_html_add(html_user_body(user, 0),
3066 lists, 3064 lists,
3067 html_footer())); 3065 html_footer(user)));
3068 3066
3069 return xs_html_render_s(html, "<!DOCTYPE html>\n"); 3067 return xs_html_render_s(html, "<!DOCTYPE html>\n");
3070} 3068}
@@ -3314,7 +3312,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
3314 xs_set_free(&rep); 3312 xs_set_free(&rep);
3315 3313
3316 xs_html_add(body, 3314 xs_html_add(body,
3317 html_footer()); 3315 html_footer(user));
3318 3316
3319 /* set the check time to now */ 3317 /* set the check time to now */
3320 xs *dummy = notify_check_time(user, 1); 3318 xs *dummy = notify_check_time(user, 1);
@@ -3569,7 +3567,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
3569 html_user_head(&snac, NULL, NULL), 3567 html_user_head(&snac, NULL, NULL),
3570 xs_html_add(html_user_body(&snac, 0), 3568 xs_html_add(html_user_body(&snac, 0),
3571 page, 3569 page,
3572 html_footer())); 3570 html_footer(user)));
3573 3571
3574 *body = xs_html_render_s(html, "<!DOCTYPE html>\n"); 3572 *body = xs_html_render_s(html, "<!DOCTYPE html>\n");
3575 *b_size = strlen(*body); 3573 *b_size = strlen(*body);