]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
Alloc configuration of cgi path
authorIan Campbell <ian.campbell@citrix.com>
Mon, 20 May 2013 13:43:18 +0000 (08:43 -0500)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 20 May 2013 13:43:18 +0000 (08:43 -0500)
CGI/common.pl
config/emesinae.conf
scripts/control.pl

index 640663f7d377f3508835c07a5740ae6313fba1fa..91afed30a7039ee2518cdaa9f1bc671bc2f6b323 100644 (file)
@@ -1,7 +1,12 @@
+sub cgipath {
+    my $p   = shift;
+    return $c{CGIPath} . $p;
+}
+
 sub buglink {
     my $b   = shift;
     my $t   = shift or $b->{title};
-    my $url = "/cgi-bin/bug.pl?id=" . $b->{id};
+    my $url = cgipath("bug.pl?id=" . $b->{id});
     return a( { href => $url }, $t );
 }
 
@@ -10,7 +15,7 @@ sub msglink {
     my $t    = shift;
     my %attr = @_;
 
-    my $url = "/cgi-bin/message.pl?id=" . $m->{id};
+    my $url = cgipath("message.pl?id=" . $m->{id});
     $url .= "&part=" . $attr{part} if $attr{part};
     $url .= "&raw=" . $attr{raw}   if $attr{raw};
 
index fc3abccc1298fe72d9ae9b07e3a77144a8e01045..00df2eb52769ba8c2cb1a7d365f8df3f7ff48fc4 100644 (file)
@@ -29,6 +29,9 @@ $c{ListAliases} = qw/emesinae-test\@list.example.org/;
 $c{SpoolDir}        = "/var/local/emesinae/spool/";
 $c{ArchiveIncoming} = 0;
 
+# Path component of the CGI URL
+$c{CGIPath}         = "/cgi-bin/";
+
 $c{LockDir} = "/var/local/emesinae/locks/";
 
 $c{ReportingURL} = "http://bugs.example.com/Howto_Report_Bugs.html";
index 8402f5549eb70a0d41679a016fdb0f2b43574d46..cf7f7bbb0502d7cd57898b15067e9d64930195f6 100755 (executable)
@@ -394,7 +394,7 @@ while (<M>) {
 
 sub bugurl ($) {
     my $bn = shift;
-    return "http://" . $c{TrackerHost} . "/cgi-bin/bug.pl?id=$bn";
+    return "http://" . $c{TrackerHost} . $c{CGIPath} . "bug.pl?id=$bn";
 }
 
 push @reply, ( "", "Modified/created Bugs:" ) if %bugs;