summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/html.c b/html.c
index 9eefeec..d50333a 100644
--- a/html.c
+++ b/html.c
@@ -2563,9 +2563,9 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2563 char *q = xs_dict_get(q_vars, "q"); 2563 char *q = xs_dict_get(q_vars, "q");
2564 2564
2565 if (q && *q) { 2565 if (q && *q) {
2566 /* search by content */ 2566 /** search by content **/
2567 int to = 0; 2567 int to = 0;
2568 xs *tl = content_search(&snac, q, 1, skip ? 10 : 0, skip + show, &to); 2568 xs *tl = content_search(&snac, q, 1, skip, show, skip ? 10 : 0, &to);
2569 xs *title = NULL; 2569 xs *title = NULL;
2570 xs *page = xs_fmt("/admin?q=%s", q); 2570 xs *page = xs_fmt("/admin?q=%s", q);
2571 int tl_len = xs_list_len(tl); 2571 int tl_len = xs_list_len(tl);
@@ -2573,10 +2573,12 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2573 if (tl_len) 2573 if (tl_len)
2574 title = xs_fmt(L("Search results for '%s'"), q); 2574 title = xs_fmt(L("Search results for '%s'"), q);
2575 else 2575 else
2576 if (skip)
2577 title = xs_fmt(L("No more matches for '%s'"), q);
2578 else
2576 title = xs_fmt(L("Nothing found for '%s'"), q); 2579 title = xs_fmt(L("Nothing found for '%s'"), q);
2577 2580
2578 *body = html_timeline(&snac, tl, 0, 0, tl_len, 2581 *body = html_timeline(&snac, tl, 0, skip, show, tl_len > 0, title, page, 1);
2579 (to || tl_len == skip + show), title, page, 1);
2580 *b_size = strlen(*body); 2582 *b_size = strlen(*body);
2581 status = 200; 2583 status = 200;
2582 } 2584 }