commit 8e1a2c5
Alexandre Oliva
·
2025-02-06 08:04:36 +0000 UTC
parent 2b28fe8
Merged 53ad5cdf0371fc068fa03bf287fc94be.
5 files changed,
+7,
-2
+2,
-0
1@@ -12,6 +12,8 @@ Fixed link detection in posts (contributed by inz).
2
3 Allow multiple editors for command-line posts (contributed by inz).
4
5+Separated maximum and default timeline entry count, allowing larger timelines to be requested without having to increase the default (contributed by lxo).
6+
7 Special thanks to fellow developer inz for bringing my attention to code places where I should have been more careful.
8
9 ## 2.71
+2,
-0
1@@ -154,6 +154,8 @@ to those servers that went timeout in the previous retry. If you want to
2 give slow servers a chance to receive your messages, you can increase this
3 value (but also take into account that processing the queue will take longer
4 while waiting for these molasses to respond).
5+.It Ic def_timeline_entries
6+This is the default timeline entries shown in the web interface.
7 .It Ic max_timeline_entries
8 This is the maximum timeline entries shown in the web interface.
9 .It Ic timeline_purge_days
M
html.c
+1,
-1
1@@ -3306,7 +3306,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2 cache = 0;
3
4 int skip = 0;
5- int def_show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
6+ int def_show = xs_number_get(xs_dict_get_def(srv_config, "def_timeline_entries", "50"));
7 int show = def_show;
8
9 if ((v = xs_dict_get(q_vars, "skip")) != NULL)
M
httpd.c
+1,
-1
1@@ -219,7 +219,7 @@ int server_get_handler(xs_dict *req, const char *q_path,
2 if (xs_type(q_vars) == XSTYPE_DICT && (t = xs_dict_get(q_vars, "t"))) {
3 /** search by tag **/
4 int skip = 0;
5- int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
6+ int show = xs_number_get(xs_dict_get_def(srv_config, "def_timeline_entries", "50"));
7 const char *v;
8
9 if ((v = xs_dict_get(q_vars, "skip")) != NULL)
M
utils.c
+1,
-0
1@@ -28,6 +28,7 @@ static const char *default_srv_config = "{"
2 "\"queue_timeout\": 6,"
3 "\"queue_timeout_2\": 8,"
4 "\"cssurls\": [\"\"],"
5+ "\"def_timeline_entries\": 50,"
6 "\"max_timeline_entries\": 50,"
7 "\"timeline_purge_days\": 120,"
8 "\"local_purge_days\": 0,"