summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-11-19 18:34:14 +0100
committerGravatar default2023-11-19 18:34:14 +0100
commit3c6d32334ad03cecb9669cccd820ebc7f5b8877d (patch)
treea4d00444cfe10d7ce198e9bd392af927542b81e4
parentUpdated TODO. (diff)
downloadsnac2-3c6d32334ad03cecb9669cccd820ebc7f5b8877d.tar.gz
snac2-3c6d32334ad03cecb9669cccd820ebc7f5b8877d.tar.xz
snac2-3c6d32334ad03cecb9669cccd820ebc7f5b8877d.zip
History can be disabled.
-rw-r--r--html.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/html.c b/html.c
index 9088617..d741828 100644
--- a/html.c
+++ b/html.c
@@ -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