aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui-shared.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 21e163c..f8e5bef 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -144,10 +144,10 @@ static void site_url(const char *page, const char *search, const char *sort, int
144{ 144{
145 char *delim = "?"; 145 char *delim = "?";
146 146
147 if (ctx.cfg.virtual_root) 147 if (!page)
148 html_attr(ctx.cfg.virtual_root); 148 html_attr(ctx.qry.url);
149 else 149 else
150 html_url_path(ctx.cfg.script_name); 150 html_attr(cgit_rooturl());
151 151
152 if (page) { 152 if (page) {
153 htmlf("?p=%s", page); 153 htmlf("?p=%s", page);