Fix repolist search links with virtual root

Signed-off-by: Geoff Johnstone <geoff.johnstone@googlemail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Geoff Johnstone 2009-09-20 11:32:07 +01:00 committed by Lars Hjemli
parent 8071e18dcb
commit 9735835c0e
2 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,7 @@ int is_in_url(struct cgit_repo *repo)
void print_sort_header(const char *title, const char *sort)
{
htmlf("<th class='left'><a href='./?s=%s", sort);
htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort);
if (ctx.qry.search) {
html("&q=");
html_url_arg(ctx.qry.search);

View File

@ -3,6 +3,7 @@
extern char *cgit_httpscheme();
extern char *cgit_hosturl();
extern char *cgit_rooturl();
extern char *cgit_repourl(const char *reponame);
extern char *cgit_fileurl(const char *reponame, const char *pagename,
const char *filename, const char *query);