mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
Make git_pageurl handle NULL querystrings
This is suddenly useful after the repo.defbranch-related changes. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
97de8f0554
commit
723469962b
@ -61,8 +61,12 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
|
||||
const char *query)
|
||||
{
|
||||
if (cgit_virtual_root) {
|
||||
if (query)
|
||||
return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame,
|
||||
pagename, query);
|
||||
else
|
||||
return fmt("%s/%s/%s/", cgit_virtual_root, reponame,
|
||||
pagename);
|
||||
} else {
|
||||
return fmt("?r=%s&p=%s&%s", reponame, pagename, query);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user