diff options
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd.c b/cmd.c index 0eb75b1..64f6639 100644 --- a/cmd.c +++ b/cmd.c | |||
@@ -55,7 +55,7 @@ static void about_fn(void) | |||
55 | cgit_redirect(ctx.repo->homepage, false); | 55 | cgit_redirect(ctx.repo->homepage, false); |
56 | else { | 56 | else { |
57 | char *currenturl = cgit_currenturl(); | 57 | char *currenturl = cgit_currenturl(); |
58 | char *redirect = fmtalloc("%s../", currenturl); | 58 | char *redirect = cgit_pageurl(ctx.repo->url, "summary", NULL); |
59 | cgit_redirect(redirect, false); | 59 | cgit_redirect(redirect, false); |
60 | free(currenturl); | 60 | free(currenturl); |
61 | free(redirect); | 61 | free(redirect); |
@@ -196,9 +196,9 @@ struct cgit_cmd *cgit_get_cmd(void) | |||
196 | 196 | ||
197 | if (ctx.qry.page == NULL) { | 197 | if (ctx.qry.page == NULL) { |
198 | if (ctx.repo) | 198 | if (ctx.repo) |
199 | ctx.qry.page = "summary"; | 199 | ctx.qry.page = ctx.repo->default_tab; |
200 | else | 200 | else |
201 | ctx.qry.page = "repolist"; | 201 | ctx.qry.page = ctx.cfg.root_default_tab; |
202 | } | 202 | } |
203 | 203 | ||
204 | for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++) | 204 | for (i = 0; i < sizeof(cmds)/sizeof(*cmds); i++) |