mirror of
https://git.zx2c4.com/cgit
synced 2025-08-31 23:10:04 +02:00
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>
This commit is contained in:
parent
43d40f2b70
commit
30ccdcaa74
6 changed files with 98 additions and 40 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue