Package: mailgraph
Version: 1.13-1
Tags: patch, upstream
Hi,
mailgraph.cgi does not show graphs when it is renamed to something
different. The patch below makes it use the name under which it was
called to generate the graphs.
Bye,
Joerg
--- mailgraph.cgi.orig 2007-07-24 08:47:05.000000000 +0200
+++ mailgraph.cgi 2007-07-24 08:50:37.000000000 +0200
@@ -7,6 +7,7 @@
use RRDs;
use POSIX qw(uname);
+use File::Basename;
my $VERSION = "1.13";
@@ -198,10 +199,11 @@
}
print "</ul>\n";
+ my $scriptnamereal = basename $ENV{SCRIPT_NAME};
for my $n (0..$#graphs) {
print "<h2 id=\"G$n\">$graphs[$n]{title}</h2>\n";
- print "<p><img src=\"$scriptname?${n}-n\"
alt=\"mailgraph\"/><br/>\n";
- print "<img src=\"$scriptname?${n}-e\"
alt=\"mailgraph\"/></p>\n";
+ print "<p><img src=\"$scriptnamereal?${n}-n\"
alt=\"mailgraph\"/><br/>\n";
+ print "<img src=\"$scriptnamereal?${n}-e\"
alt=\"mailgraph\"/></p>\n";
}
print <<FOOTER;
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]