summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-05-11 09:29:38 +0200
committerdefault <nobody@localhost>2024-05-11 09:29:38 +0200
commit1762e0f1459599524b54aabfd470e171e1d6e592 (patch)
tree10d950904c5d559a9454d4b201b216de7b182798 /html.c
parentf2a33727e781a9f7338d8321b3d5b504ca4dab8e (diff)
Added an incremental max seconds value to every content search page.
Diffstat (limited to 'html.c')
-rw-r--r--html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/html.c b/html.c
index a0a9cf7..0cdb608 100644
--- a/html.c
+++ b/html.c
@@ -2525,7 +2525,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
int skip = 0;
int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
- char *q_vars = xs_dict_get(req, "q_vars");
+ 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;
if ((v = xs_dict_get(q_vars, "show")) != NULL)
@@ -2575,9 +2575,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
if (q && *q) {
/** search by content **/
int to = 0;
- xs *tl = content_search(&snac, q, 1, skip, show, skip ? 10 : 0, &to);
+ int msecs = atoi(xs_dict_get_def(q_vars, "msecs", "0"));
+ xs *tl = content_search(&snac, q, 1, skip, show, msecs, &to);
xs *title = NULL;
- xs *page = xs_fmt("/admin?q=%s", q);
+ xs *page = xs_fmt("/admin?q=%s&msecs=%d", q, msecs + 10);
int tl_len = xs_list_len(tl);
if (tl_len)