From: Steinar H. Gunderson Date: Sun, 17 Jul 2005 17:46:02 +0000 (+0000) Subject: Stop hardcoding web roots -- make it a config variable instead. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=ecdc9e6d319079079eb2e6a68527c169328195e3 Stop hardcoding web roots -- make it a config variable instead. --- diff --git a/config.pm b/config.pm index fe8ab3d..38bb1b8 100644 --- a/config.pm +++ b/config.pm @@ -6,6 +6,9 @@ package ccbs::config; # The default web locale. our $lang = "en_US.UTF-8"; +# The base path for all web stuff. +our $webroot = "http://ccbs.sesse.net/"; + # Set this flag to enable debugging of all SQL statements. our $dbdebug = 0; diff --git a/html/ccbs.pm b/html/ccbs.pm index 6583802..1cabc29 100755 --- a/html/ccbs.pm +++ b/html/ccbs.pm @@ -45,7 +45,7 @@ sub print_see_other { my $location = shift; print CGI::header(-status=>'303 See other', - -location=>'http://ccbs.sesse.net/' . $location, + -location=>$ccbs::config::webroot . $location, -type=>'text/html; charset=utf-8'); } diff --git a/html/do-set-language.pl b/html/do-set-language.pl index 3750cb8..c2c119c 100755 --- a/html/do-set-language.pl +++ b/html/do-set-language.pl @@ -9,7 +9,7 @@ my $cgi = new CGI; my $cookie = new CGI::Cookie(-name=>'language', -value=>($cgi->param('lang'))); print CGI::header(-status=>'303 See other', - -location=>'http://ccbs.sesse.net/', + -location=>$ccbs::config::webroot, -cookie=>$cookie, -type=>'text/html; charset=utf-8');