diff options
Diffstat (limited to '')
| -rw-r--r-- | html.c | 28 |
1 files changed, 14 insertions, 14 deletions
| @@ -774,7 +774,7 @@ static xs_html *html_user_body(snac *user, int read_only) | |||
| 774 | 774 | ||
| 775 | xs_dict *val_links = user->links; | 775 | xs_dict *val_links = user->links; |
| 776 | if (xs_is_null(val_links)) | 776 | if (xs_is_null(val_links)) |
| 777 | val_links = xs_stock_dict; | 777 | val_links = xs_stock(XSTYPE_DICT); |
| 778 | 778 | ||
| 779 | xs_html *snac_metadata = xs_html_tag("div", | 779 | xs_html *snac_metadata = xs_html_tag("div", |
| 780 | xs_html_attr("class", "snac-metadata")); | 780 | xs_html_attr("class", "snac-metadata")); |
| @@ -852,8 +852,8 @@ xs_html *html_top_controls(snac *snac) | |||
| 852 | "new_post_div", "new_post_form", | 852 | "new_post_div", "new_post_form", |
| 853 | L("What's on your mind?"), "", | 853 | L("What's on your mind?"), "", |
| 854 | NULL, NULL, | 854 | NULL, NULL, |
| 855 | xs_stock_false, "", | 855 | xs_stock(XSTYPE_FALSE), "", |
| 856 | xs_stock_false, NULL, | 856 | xs_stock(XSTYPE_FALSE), NULL, |
| 857 | NULL, 1), | 857 | NULL, 1), |
| 858 | 858 | ||
| 859 | /** operations **/ | 859 | /** operations **/ |
| @@ -1285,7 +1285,7 @@ xs_html *html_entry_controls(snac *snac, char *actor, const xs_dict *msg, const | |||
| 1285 | "", prev_src, | 1285 | "", prev_src, |
| 1286 | id, NULL, | 1286 | id, NULL, |
| 1287 | xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"), | 1287 | xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"), |
| 1288 | xs_stock_false, redir, | 1288 | xs_stock(XSTYPE_FALSE), redir, |
| 1289 | NULL, 0)), | 1289 | NULL, 0)), |
| 1290 | xs_html_tag("p", NULL)); | 1290 | xs_html_tag("p", NULL)); |
| 1291 | } | 1291 | } |
| @@ -1304,7 +1304,7 @@ xs_html *html_entry_controls(snac *snac, char *actor, const xs_dict *msg, const | |||
| 1304 | "", ct, | 1304 | "", ct, |
| 1305 | NULL, NULL, | 1305 | NULL, NULL, |
| 1306 | xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"), | 1306 | xs_dict_get(msg, "sensitive"), xs_dict_get(msg, "summary"), |
| 1307 | xs_stock_false, redir, | 1307 | xs_stock(XSTYPE_FALSE), redir, |
| 1308 | id, 0)), | 1308 | id, 0)), |
| 1309 | xs_html_tag("p", NULL)); | 1309 | xs_html_tag("p", NULL)); |
| 1310 | } | 1310 | } |
| @@ -2181,8 +2181,8 @@ xs_html *html_people_list(snac *snac, xs_list *list, char *header, char *t) | |||
| 2181 | dm_div_id, dm_form_id, | 2181 | dm_div_id, dm_form_id, |
| 2182 | "", "", | 2182 | "", "", |
| 2183 | NULL, actor_id, | 2183 | NULL, actor_id, |
| 2184 | xs_stock_false, "", | 2184 | xs_stock(XSTYPE_FALSE), "", |
| 2185 | xs_stock_false, NULL, | 2185 | xs_stock(XSTYPE_FALSE), NULL, |
| 2186 | NULL, 0), | 2186 | NULL, 0), |
| 2187 | xs_html_tag("p", NULL)); | 2187 | xs_html_tag("p", NULL)); |
| 2188 | 2188 | ||
| @@ -2802,7 +2802,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 2802 | msg = msg_note(&snac, content_2, to, in_reply_to, attach_list, priv); | 2802 | msg = msg_note(&snac, content_2, to, in_reply_to, attach_list, priv); |
| 2803 | 2803 | ||
| 2804 | if (sensitive != NULL) { | 2804 | if (sensitive != NULL) { |
| 2805 | msg = xs_dict_set(msg, "sensitive", xs_stock_true); | 2805 | msg = xs_dict_set(msg, "sensitive", xs_stock(XSTYPE_TRUE)); |
| 2806 | msg = xs_dict_set(msg, "summary", xs_is_null(summary) ? "..." : summary); | 2806 | msg = xs_dict_set(msg, "summary", xs_is_null(summary) ? "..." : summary); |
| 2807 | } | 2807 | } |
| 2808 | 2808 | ||
| @@ -3036,17 +3036,17 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 3036 | snac.config = xs_dict_set(snac.config, "purge_days", days); | 3036 | snac.config = xs_dict_set(snac.config, "purge_days", days); |
| 3037 | } | 3037 | } |
| 3038 | if ((v = xs_dict_get(p_vars, "drop_dm_from_unknown")) != NULL && strcmp(v, "on") == 0) | 3038 | if ((v = xs_dict_get(p_vars, "drop_dm_from_unknown")) != NULL && strcmp(v, "on") == 0) |
| 3039 | snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", xs_stock_true); | 3039 | snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", xs_stock(XSTYPE_TRUE)); |
| 3040 | else | 3040 | else |
| 3041 | snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", xs_stock_false); | 3041 | snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", xs_stock(XSTYPE_FALSE)); |
| 3042 | if ((v = xs_dict_get(p_vars, "bot")) != NULL && strcmp(v, "on") == 0) | 3042 | if ((v = xs_dict_get(p_vars, "bot")) != NULL && strcmp(v, "on") == 0) |
| 3043 | snac.config = xs_dict_set(snac.config, "bot", xs_stock_true); | 3043 | snac.config = xs_dict_set(snac.config, "bot", xs_stock(XSTYPE_TRUE)); |
| 3044 | else | 3044 | else |
| 3045 | snac.config = xs_dict_set(snac.config, "bot", xs_stock_false); | 3045 | snac.config = xs_dict_set(snac.config, "bot", xs_stock(XSTYPE_FALSE)); |
| 3046 | if ((v = xs_dict_get(p_vars, "private")) != NULL && strcmp(v, "on") == 0) | 3046 | if ((v = xs_dict_get(p_vars, "private")) != NULL && strcmp(v, "on") == 0) |
| 3047 | snac.config = xs_dict_set(snac.config, "private", xs_stock_true); | 3047 | snac.config = xs_dict_set(snac.config, "private", xs_stock(XSTYPE_TRUE)); |
| 3048 | else | 3048 | else |
| 3049 | snac.config = xs_dict_set(snac.config, "private", xs_stock_false); | 3049 | snac.config = xs_dict_set(snac.config, "private", xs_stock(XSTYPE_FALSE)); |
| 3050 | if ((v = xs_dict_get(p_vars, "metadata")) != NULL) { | 3050 | if ((v = xs_dict_get(p_vars, "metadata")) != NULL) { |
| 3051 | /* split the metadata and store it as a dict */ | 3051 | /* split the metadata and store it as a dict */ |
| 3052 | xs_dict *md = xs_dict_new(); | 3052 | xs_dict *md = xs_dict_new(); |