mirror of
https://git.zx2c4.com/cgit
synced 2025-06-26 19:58:42 +02:00
Don't hardcode urls when SCRIPT_NAME is available
Also, let the makefile define the name of the installed cgi and use that definition as a default value for cgit_script_name variable. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
6fb7d09fea
commit
ea2831f1c8
5 changed files with 9 additions and 4 deletions
|
@ -45,7 +45,7 @@ char *cgit_rooturl()
|
|||
if (cgit_virtual_root)
|
||||
return fmt("%s/", cgit_virtual_root);
|
||||
else
|
||||
return "./cgit.cgi";
|
||||
return cgit_script_name;
|
||||
}
|
||||
|
||||
char *cgit_repourl(const char *reponame)
|
||||
|
@ -71,7 +71,7 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
|
|||
char *cgit_currurl()
|
||||
{
|
||||
if (!cgit_virtual_root)
|
||||
return "./cgit.cgi";
|
||||
return cgit_script_name;
|
||||
else if (cgit_query_page)
|
||||
return fmt("%s/%s/%s/", cgit_virtual_root, cgit_query_repo, cgit_query_page);
|
||||
else if (cgit_query_repo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue