-rw-r--r-- | ui-shared.c | 8 |
1 files 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 @@ -521,33 +521,33 @@ void cgit_print_docstart(struct cgit_context *ctx) html("</title>\n"); htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); if (ctx->cfg.robots && *ctx->cfg.robots) htmlf("<meta name='robots' content='%s'/>\n", ctx->cfg.robots); html("<link rel='stylesheet' type='text/css' href='"); html_attr(ctx->cfg.css); html("'/>\n"); if (ctx->cfg.favicon) { html("<link rel='shortcut icon' href='"); html_attr(ctx->cfg.favicon); html("'/>\n"); } if (host && ctx->repo) { html("<link rel='alternate' title='Atom feed' href='"); html(cgit_httpscheme()); html_attr(cgit_hosturl()); - html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path, + html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.vpath, fmt("h=%s", ctx->qry.head))); html("' type='application/atom+xml'/>\n"); } if (ctx->cfg.head_include) html_include(ctx->cfg.head_include); html("</head>\n"); html("<body>\n"); if (ctx->cfg.header) html_include(ctx->cfg.header); } void cgit_print_docend() { html("</div> <!-- class=content -->\n"); if (ctx.cfg.embedded) { html("</div> <!-- id=cgit -->\n"); @@ -608,34 +608,34 @@ int print_archive_ref(const char *refname, const unsigned char *sha1, url = cgit_pageurl(ctx.qry.repo, "blob", fmt("id=%s&path=%s", sha1_to_hex(fileid), buf)); html_link_open(url, NULL, "menu"); html_txt(strlpart(buf, 20)); html_link_close(); return 0; } void cgit_add_hidden_formfields(int incl_head, int incl_search, const char *page) { char *url; 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); } if (incl_head && ctx.qry.head && ctx.repo->defbranch && strcmp(ctx.qry.head, ctx.repo->defbranch)) html_hidden("h", ctx.qry.head); if (ctx.qry.sha1) html_hidden("id", ctx.qry.sha1); if (ctx.qry.sha2) html_hidden("id2", ctx.qry.sha2); if (ctx.qry.showmsg) html_hidden("showmsg", "1"); if (incl_search) { if (ctx.qry.grep) @@ -715,33 +715,33 @@ void cgit_print_pageheader(struct cgit_context *ctx) ctx->qry.sha1, NULL); cgit_commit_link("commit", NULL, hc(ctx, "commit"), ctx->qry.head, ctx->qry.sha1, 0); cgit_diff_link("diff", NULL, hc(ctx, "diff"), ctx->qry.head, ctx->qry.sha1, ctx->qry.sha2, NULL, 0); if (ctx->repo->max_stats) cgit_stats_link("stats", NULL, hc(ctx, "stats"), ctx->qry.head, NULL); if (ctx->repo->readme) reporevlink("about", "about", NULL, hc(ctx, "about"), ctx->qry.head, NULL, NULL); html("</td><td class='form'>"); html("<form class='right' method='get' action='"); if (ctx->cfg.virtual_root) html_url_path(cgit_fileurl(ctx->qry.repo, "log", - ctx->qry.path, NULL)); + ctx->qry.vpath, NULL)); html("'>\n"); cgit_add_hidden_formfields(1, 0, "log"); html("<select name='qt'>\n"); html_option("grep", "log msg", ctx->qry.grep); html_option("author", "author", ctx->qry.grep); html_option("committer", "committer", ctx->qry.grep); html("</select>\n"); html("<input class='txt' type='text' size='10' name='q' value='"); html_attr(ctx->qry.search); html("'/>\n"); html("<input type='submit' value='search'/>\n"); html("</form>\n"); } else { site_link(NULL, "index", NULL, hc(ctx, "repolist"), NULL, 0); if (ctx->cfg.root_readme) site_link("about", "about", NULL, hc(ctx, "about"), |