summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-07-02 20:01:00 +0200
committerdefault <nobody@localhost>2024-07-02 20:01:00 +0200
commitec5c72f06c45c563edecd2f7ec7eb6c1c268eb24 (patch)
tree0fc792c0f83b82d9370d6e3dbb1358c7cf36c480 /html.c
parentaa3e351951751adbfaf87ed1bdb63767221dd214 (diff)
Minor search tweaks.
Diffstat (limited to 'html.c')
-rw-r--r--html.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/html.c b/html.c
index b9946e6..2d1acd8 100644
--- a/html.c
+++ b/html.c
@@ -2634,7 +2634,9 @@ int html_get_handler(const xs_dict *req, const char *q_path,
cache = 0;
int skip = 0;
- int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
+ int def_show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
+ int show = def_show;
+
const xs_dict *q_vars = xs_dict_get(req, "q_vars");
if ((v = xs_dict_get(q_vars, "skip")) != NULL)
skip = atoi(v), cache = 0, save = 0;
@@ -2651,6 +2653,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
}
}
+ /* a show of 0 has no sense */
+ if (show == 0)
+ show = def_show;
+
if (p_path == NULL) { /** public timeline **/
xs *h = xs_str_localtime(0, "%Y-%m.html");
@@ -2720,6 +2726,9 @@ int html_get_handler(const xs_dict *req, const char *q_path,
xs *page = xs_fmt("/admin?q=%s&msecs=%d", q, msecs + 10);
int tl_len = xs_list_len(tl);
+ if (to)
+ title = xs_fmt(L("Search results for '%s' (may be more)"), q);
+ else
if (tl_len)
title = xs_fmt(L("Search results for '%s'"), q);
else