diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-05-18 05:00:54 +0400 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-19 00:51:01 +0400 |
commit | 30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de (patch) | |
tree | efb3eddd091117281d5592c9eab44bc63121edf6 /ui-shared.c | |
parent | 43d40f2b704151d145a1383b2b964210915ecae4 (diff) |
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.c | 5 |
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); } } |