summaryrefslogtreecommitdiff
path: root/ui-shared.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-05-18 03:00:54 +0200
committerLars Hjemli <hjemli@gmail.com>2007-05-18 22:51:01 +0200
commit30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de (patch)
treeefb3eddd091117281d5592c9eab44bc63121edf6 /ui-shared.c
parent43d40f2b704151d145a1383b2b964210915ecae4 (diff)
downloadcgit-30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de.tar.gz
cgit-30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de.tar.bz2
cgit-30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de.zip
Enable url=value querystring parameter
This makes is possible to use repo-urls like '/pub/scm/git/git.git' and even add path specifications, like '/pub/scm/git/git.git/log/documentation'. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 6211056..c7fbc5e 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -68,7 +68,10 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
return fmt("%s/%s/%s/", cgit_virtual_root, reponame,
pagename);
} else {
- return fmt("?r=%s&p=%s&%s", reponame, pagename, query);
+ if (query)
+ return fmt("?r=%s&p=%s&%s", reponame, pagename, query);
+ else
+ return fmt("?r=%s&p=%s", reponame, pagename);
}
}