diff options
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -141,6 +141,21 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 141 | 141 | ||
| 142 | /* is it the server root? */ | 142 | /* is it the server root? */ |
| 143 | if (*q_path == '\0') { | 143 | if (*q_path == '\0') { |
| 144 | xs_dict *q_vars = xs_dict_get(req, "q_vars"); | ||
| 145 | char *t = NULL; | ||
| 146 | |||
| 147 | if (xs_type(q_vars) == XSTYPE_DICT && (t = xs_dict_get(q_vars, "t"))) { | ||
| 148 | /* tag search query */ | ||
| 149 | int skip = xs_number_get(xs_dict_get(q_vars, "skip")); | ||
| 150 | int show = xs_number_get(xs_dict_get(q_vars, "show")); | ||
| 151 | |||
| 152 | if (show == 0) | ||
| 153 | show = 64; | ||
| 154 | |||
| 155 | xs *tl = tag_search(t, skip, show); | ||
| 156 | *body = html_timeline(NULL, tl, 0, skip, show, 0); | ||
| 157 | } | ||
| 158 | else | ||
| 144 | if (xs_type(xs_dict_get(srv_config, "show_instance_timeline")) == XSTYPE_TRUE) { | 159 | if (xs_type(xs_dict_get(srv_config, "show_instance_timeline")) == XSTYPE_TRUE) { |
| 145 | xs *tl = timeline_instance_list(0, 30); | 160 | xs *tl = timeline_instance_list(0, 30); |
| 146 | *body = html_timeline(NULL, tl, 0, 0, 0, 0); | 161 | *body = html_timeline(NULL, tl, 0, 0, 0, 0); |