From ea2831f1c826d92c0158474c2d07837ec2f9fd6c Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Tue, 15 May 2007 00:48:31 +0200 Subject: 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 --- ui-shared.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui-shared.c') 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) -- cgit 1.4.1 al.agency/.gitignore?follow=1'>log tree commit diff
Commit message (Expand)Author
2019-09-16Add The Just CityJune McEnroe
2019-09-12Only GET the final redirect locationJune McEnroe
2019-09-12Consume entire bodyJune McEnroe
2019-09-10Add title -v flagJune McEnroe
2019-09-10Use curl error bufferJune McEnroe
2019-09-10Set Accept-Encoding in titleJune McEnroe
2019-09-08Set title User-AgentJune McEnroe
2019-09-07Add -x flag to titleJune McEnroe
2019-09-07Ignore SIGPIPE in relayJune McEnroe
2019-09-07Add A Memory Called EmpireJune McEnroe
2019-09-05Handle lack of Content-TypeJune McEnroe
2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe
2019-09-05Decode entities in titlesJune McEnroe
2019-09-05Print title as soon as it's availableJune McEnroe
2019-09-05Use CURL_PREFIX to set flagsJune McEnroe
2019-09-05Add titleJune McEnroe
2019-09-04Add Avorter n'est pas tuerJune McEnroe
2019-08-29Unset executable on shell scriptsJune McEnroe
2019-08-29Add long-missing setopt to bin.7June McEnroe
2019-08-29Add editJune McEnroe