summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Side-by-side diff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/ui-shared.c b/ui-shared.c
index d4376ce..1c1415e 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -59,4 +59,4 @@ char *cgit_repourl(const char *reponame)
-char *cgit_pageurl(const char *reponame, const char *pagename,
- const char *query)
+char *cgit_fileurl(const char *reponame, const char *pagename,
+ const char *filename, const char *query)
{
@@ -64,4 +64,4 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
if (query)
- return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame,
- pagename, query);
+ return fmt("%s/%s/%s/%s?%s", cgit_virtual_root, reponame,
+ pagename, filename?filename:"", query);
else
@@ -77,2 +77,9 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
+char *cgit_pageurl(const char *reponame, const char *pagename,
+ const char *query)
+{
+ return cgit_fileurl(reponame,pagename,0,query);
+}
+
+
char *cgit_currurl()
@@ -370 +377,3 @@ void cgit_print_snapshot_start(const char *mimetype, const char *filename,
}
+
+/* vim:set sw=8: */