From c8e3295469bd3b8e38a9ea4478d517d3861e6c93 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Thu, 10 Jun 2010 01:09:27 +0200 Subject: ui-shared: Replace ctx.qry.path with ctx.qry.vpath In all cases where ui-shared uses ctx.qry.path, it is done so in the context of a in-project path, and not in the context in which the 'refs' page or the 'clone'-related functionality uses ctx.qry.path. Make this explicit by using ctx.qry.vpath instead. This path introduces no fundamental difference in functionality except for fixing some minor bugs, for example the Atom feed reference from a "$repo/refs/heads/" page. Note that the usage of ctx.qry.path in the other ui-.c files is ok, since that code presumably is only executed in the context of its own , so the correct interpretation of ctx.qry.path is never in question. Signed-off-by: Johan Herland Signed-off-by: Lars Hjemli --- ui-shared.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index 137e469..3d5030b 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -534,7 +534,7 @@ void cgit_print_docstart(struct cgit_context *ctx) html("\n"); } @@ -621,8 +621,8 @@ void cgit_add_hidden_formfields(int incl_head, int incl_search, if (!ctx.cfg.virtual_root) { url = fmt("%s/%s", ctx.qry.repo, page); - if (ctx.qry.path) - url = fmt("%s/%s", url, ctx.qry.path); + if (ctx.qry.vpath) + url = fmt("%s/%s", url, ctx.qry.vpath); html_hidden("url", url); } @@ -728,7 +728,7 @@ void cgit_print_pageheader(struct cgit_context *ctx) html("
\n"); cgit_add_hidden_formfields(1, 0, "log"); html("