summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,
2634 cache = 0; 2634 cache = 0;
2635 2635
2636 int skip = 0; 2636 int skip = 0;
2637 int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries")); 2637 int def_show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries"));
2638 int show = def_show;
2639
2638 const xs_dict *q_vars = xs_dict_get(req, "q_vars"); 2640 const xs_dict *q_vars = xs_dict_get(req, "q_vars");
2639 if ((v = xs_dict_get(q_vars, "skip")) != NULL) 2641 if ((v = xs_dict_get(q_vars, "skip")) != NULL)
2640 skip = atoi(v), cache = 0, save = 0; 2642 skip = atoi(v), cache = 0, save = 0;
@@ -2651,6 +2653,10 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2651 } 2653 }
2652 } 2654 }
2653 2655
2656 /* a show of 0 has no sense */
2657 if (show == 0)
2658 show = def_show;
2659
2654 if (p_path == NULL) { /** public timeline **/ 2660 if (p_path == NULL) { /** public timeline **/
2655 xs *h = xs_str_localtime(0, "%Y-%m.html"); 2661 xs *h = xs_str_localtime(0, "%Y-%m.html");
2656 2662
@@ -2720,6 +2726,9 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2720 xs *page = xs_fmt("/admin?q=%s&msecs=%d", q, msecs + 10); 2726 xs *page = xs_fmt("/admin?q=%s&msecs=%d", q, msecs + 10);
2721 int tl_len = xs_list_len(tl); 2727 int tl_len = xs_list_len(tl);
2722 2728
2729 if (to)
2730 title = xs_fmt(L("Search results for '%s' (may be more)"), q);
2731 else
2723 if (tl_len) 2732 if (tl_len)
2724 title = xs_fmt(L("Search results for '%s'"), q); 2733 title = xs_fmt(L("Search results for '%s'"), q);
2725 else 2734 else