]> git.sesse.net Git - ccbs/commitdiff
Stop hardcoding web roots -- make it a config variable instead.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 17:46:02 +0000 (17:46 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 17:46:02 +0000 (17:46 +0000)
config.pm
html/ccbs.pm
html/do-set-language.pl

index fe8ab3d640a166464dce12e41a33ff0f765b1b80..38bb1b86793adfdbd1aeb17ad58f10675bac8dc5 100644 (file)
--- 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;
 
index 65838027c25483dd55cc7f888b56d69ccf9ecf88..1cabc29bb2b8fc9b5c07369d9400e7435eb9f751 100755 (executable)
@@ -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');
 }
 
index 3750cb8cf6025938071819b5959695a11ee54120..c2c119cac8591975abb1bc7c197a58ecc2079d56 100755 (executable)
@@ -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');