commit ec5c72f
default
·
2024-07-02 18:01:00 +0000 UTC
parent aa3e351
Minor search tweaks.
1 files changed,
+10,
-1
M
html.c
M
html.c
+10,
-1
1@@ -2634,7 +2634,9 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2 cache = 0;
3
4 int skip = 0;
5- int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
6+ int def_show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
7+ int show = def_show;
8+
9 const xs_dict *q_vars = xs_dict_get(req, "q_vars");
10 if ((v = xs_dict_get(q_vars, "skip")) != NULL)
11 skip = atoi(v), cache = 0, save = 0;
12@@ -2651,6 +2653,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
13 }
14 }
15
16+ /* a show of 0 has no sense */
17+ if (show == 0)
18+ show = def_show;
19+
20 if (p_path == NULL) { /** public timeline **/
21 xs *h = xs_str_localtime(0, "%Y-%m.html");
22
23@@ -2720,6 +2726,9 @@ int html_get_handler(const xs_dict *req, const char *q_path,
24 xs *page = xs_fmt("/admin?q=%s&msecs=%d", q, msecs + 10);
25 int tl_len = xs_list_len(tl);
26
27+ if (to)
28+ title = xs_fmt(L("Search results for '%s' (may be more)"), q);
29+ else
30 if (tl_len)
31 title = xs_fmt(L("Search results for '%s'"), q);
32 else