Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-05-15 02:48:31 +0400
committerLars Hjemli <hjemli@gmail.com>2007-05-15 02:48:31 +0400
commitea2831f1c826d92c0158474c2d07837ec2f9fd6c (patch)
treee8d6a89bf0f50835f9c86dd642e7906e1d050df7 /ui-shared.c
parent6fb7d09fea94b3dd6932469283358cb24f1e7e29 (diff)
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>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 6f5cf2b..b0cff7d 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -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)