|
diff --git a/cgit.c b/cgit.c index c82587b..e09c86e 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -149,16 +149,18 @@ static void querystring_cb(const char *name, const char *value) |
149 | } else if (!strcmp(name, "ofs")) { |
149 | } else if (!strcmp(name, "ofs")) { |
150 | ctx.qry.ofs = atoi(value); |
150 | ctx.qry.ofs = atoi(value); |
151 | } else if (!strcmp(name, "path")) { |
151 | } else if (!strcmp(name, "path")) { |
152 | ctx.qry.path = trim_end(value, '/'); |
152 | ctx.qry.path = trim_end(value, '/'); |
153 | } else if (!strcmp(name, "name")) { |
153 | } else if (!strcmp(name, "name")) { |
154 | ctx.qry.name = xstrdup(value); |
154 | ctx.qry.name = xstrdup(value); |
155 | } else if (!strcmp(name, "mimetype")) { |
155 | } else if (!strcmp(name, "mimetype")) { |
156 | ctx.qry.mimetype = xstrdup(value); |
156 | ctx.qry.mimetype = xstrdup(value); |
| |
157 | } else if (!strcmp(name, "s")){ |
| |
158 | ctx.qry.sort = xstrdup(value); |
157 | } |
159 | } |
158 | } |
160 | } |
159 | |
161 | |
160 | static void prepare_context(struct cgit_context *ctx) |
162 | static void prepare_context(struct cgit_context *ctx) |
161 | { |
163 | { |
162 | memset(ctx, 0, sizeof(ctx)); |
164 | memset(ctx, 0, sizeof(ctx)); |
163 | ctx->cfg.agefile = "info/web/last-modified"; |
165 | ctx->cfg.agefile = "info/web/last-modified"; |
164 | ctx->cfg.nocache = 0; |
166 | ctx->cfg.nocache = 0; |
|