diff options
| author | 2023-11-19 18:34:14 +0100 | |
|---|---|---|
| committer | 2023-11-19 18:34:14 +0100 | |
| commit | 3c6d32334ad03cecb9669cccd820ebc7f5b8877d (patch) | |
| tree | a4d00444cfe10d7ce198e9bd392af927542b81e4 | |
| parent | Updated TODO. (diff) | |
| download | snac2-3c6d32334ad03cecb9669cccd820ebc7f5b8877d.tar.gz snac2-3c6d32334ad03cecb9669cccd820ebc7f5b8877d.tar.xz snac2-3c6d32334ad03cecb9669cccd820ebc7f5b8877d.zip | |
History can be disabled.
| -rw-r--r-- | html.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -1600,7 +1600,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, | |||
| 1600 | 1600 | ||
| 1601 | s = xs_str_cat(s, "</div>\n"); | 1601 | s = xs_str_cat(s, "</div>\n"); |
| 1602 | 1602 | ||
| 1603 | if (list && user && local) { | 1603 | if (list && user && local && xs_type(xs_dict_get(srv_config, "disable_history")) != XSTYPE_TRUE) { |
| 1604 | xs *s1 = xs_fmt( | 1604 | xs *s1 = xs_fmt( |
| 1605 | "<div class=\"snac-history\">\n" | 1605 | "<div class=\"snac-history\">\n" |
| 1606 | "<p class=\"snac-history-title\">%s</p><ul>\n", | 1606 | "<p class=\"snac-history-title\">%s</p><ul>\n", |
| @@ -2105,6 +2105,9 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2105 | if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE) | 2105 | if (xs_type(xs_dict_get(snac.config, "private")) == XSTYPE_TRUE) |
| 2106 | return 403; | 2106 | return 403; |
| 2107 | 2107 | ||
| 2108 | if (xs_type(xs_dict_get(srv_config, "disable_history")) == XSTYPE_TRUE) | ||
| 2109 | return 403; | ||
| 2110 | |||
| 2108 | xs *l = xs_split(p_path, "/"); | 2111 | xs *l = xs_split(p_path, "/"); |
| 2109 | char *id = xs_list_get(l, 1); | 2112 | char *id = xs_list_get(l, 1); |
| 2110 | 2113 | ||