diff options
| author | 2024-02-21 08:12:05 +0100 | |
|---|---|---|
| committer | 2024-02-21 08:12:10 +0100 | |
| commit | bc3c7dde33cf87f55cdb2465f5f155b48e15e4df (patch) | |
| tree | e93a25dce99cdaeef86fb08debb76f3e81c6ccb3 | |
| parent | Added a page argument to html_timeline(). (diff) | |
| download | snac2-bc3c7dde33cf87f55cdb2465f5f155b48e15e4df.tar.gz snac2-bc3c7dde33cf87f55cdb2465f5f155b48e15e4df.tar.xz snac2-bc3c7dde33cf87f55cdb2465f5f155b48e15e4df.zip | |
More local -> read_only argument renamings.
| -rw-r--r-- | html.c | 10 | ||||
| -rw-r--r-- | snac.h | 2 |
2 files changed, 6 insertions, 6 deletions
| @@ -1879,7 +1879,7 @@ xs_html *html_footer(void) | |||
| 1879 | } | 1879 | } |
| 1880 | 1880 | ||
| 1881 | 1881 | ||
| 1882 | xs_str *html_timeline(snac *user, const xs_list *list, int local, | 1882 | xs_str *html_timeline(snac *user, const xs_list *list, int read_only, |
| 1883 | int skip, int show, int show_more, char *tag, char *page) | 1883 | int skip, int show, int show_more, char *tag, char *page) |
| 1884 | /* returns the HTML for the timeline */ | 1884 | /* returns the HTML for the timeline */ |
| 1885 | { | 1885 | { |
| @@ -1903,7 +1903,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, | |||
| 1903 | 1903 | ||
| 1904 | if (user) { | 1904 | if (user) { |
| 1905 | head = html_user_head(user, desc); | 1905 | head = html_user_head(user, desc); |
| 1906 | body = html_user_body(user, local); | 1906 | body = html_user_body(user, read_only); |
| 1907 | } | 1907 | } |
| 1908 | else { | 1908 | else { |
| 1909 | head = html_instance_head(); | 1909 | head = html_instance_head(); |
| @@ -1914,7 +1914,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, | |||
| 1914 | head, | 1914 | head, |
| 1915 | body); | 1915 | body); |
| 1916 | 1916 | ||
| 1917 | if (user && !local) | 1917 | if (user && !read_only) |
| 1918 | xs_html_add(body, | 1918 | xs_html_add(body, |
| 1919 | html_top_controls(user)); | 1919 | html_top_controls(user)); |
| 1920 | 1920 | ||
| @@ -1954,14 +1954,14 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, | |||
| 1954 | } | 1954 | } |
| 1955 | } | 1955 | } |
| 1956 | 1956 | ||
| 1957 | xs_html *entry = html_entry(user, msg, local, 0, v, user ? 0 : 1); | 1957 | xs_html *entry = html_entry(user, msg, read_only, 0, v, user ? 0 : 1); |
| 1958 | 1958 | ||
| 1959 | if (entry != NULL) | 1959 | if (entry != NULL) |
| 1960 | xs_html_add(posts, | 1960 | xs_html_add(posts, |
| 1961 | entry); | 1961 | entry); |
| 1962 | } | 1962 | } |
| 1963 | 1963 | ||
| 1964 | if (list && user && local) { | 1964 | if (list && user && read_only) { |
| 1965 | if (xs_type(xs_dict_get(srv_config, "disable_history")) != XSTYPE_TRUE) { | 1965 | if (xs_type(xs_dict_get(srv_config, "disable_history")) != XSTYPE_TRUE) { |
| 1966 | xs_html *ul = xs_html_tag("ul", NULL); | 1966 | xs_html *ul = xs_html_tag("ul", NULL); |
| 1967 | 1967 | ||
| @@ -296,7 +296,7 @@ xs_str *not_really_markdown(const char *content, xs_list **attach); | |||
| 296 | xs_str *sanitize(const char *content); | 296 | xs_str *sanitize(const char *content); |
| 297 | xs_str *encode_html(const char *str); | 297 | xs_str *encode_html(const char *str); |
| 298 | 298 | ||
| 299 | xs_str *html_timeline(snac *user, const xs_list *list, int local, | 299 | xs_str *html_timeline(snac *user, const xs_list *list, int read_only, |
| 300 | int skip, int show, int show_more, char *tag, char *page); | 300 | int skip, int show, int show_more, char *tag, char *page); |
| 301 | 301 | ||
| 302 | int html_get_handler(const xs_dict *req, const char *q_path, | 302 | int html_get_handler(const xs_dict *req, const char *q_path, |