summaryrefslogtreecommitdiffstats
path: root/showdependencygraph.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-12-16 10:47:12 +0100
committermkanat%bugzilla.org <>2006-12-16 10:47:12 +0100
commit9bb5d80bb96021d092a3a955a7244c441e9a1e11 (patch)
tree4935d6b17b39d45cb1458a44f89acdb392c30089 /showdependencygraph.cgi
parent28468d54847481f7bc1d51b4850126e965ee3432 (diff)
downloadbugzilla-9bb5d80bb96021d092a3a955a7244c441e9a1e11.tar.gz
bugzilla-9bb5d80bb96021d092a3a955a7244c441e9a1e11.tar.xz
Bug 345405: showdependencygraph.cgi: Dependency Graphs are broken on mod_perl
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'showdependencygraph.cgi')
-rwxr-xr-xshowdependencygraph.cgi5
1 files changed, 5 insertions, 0 deletions
diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi
index 2cea9b2f2..77259182f 100755
--- a/showdependencygraph.cgi
+++ b/showdependencygraph.cgi
@@ -247,6 +247,11 @@ if ($webdotbase =~ /^https?:/) {
# On Windows $pngfilename will contain \ instead of /
$pngfilename =~ s|\\|/|g if $^O eq 'MSWin32';
+
+ # Under mod_perl, pngfilename will have an absolute path, and we
+ # need to make that into a relative path.
+ my $cgi_root = bz_locations()->{cgi_path};
+ $pngfilename =~ s/^\Q$cgi_root\E//;
$vars->{'image_url'} = $pngfilename;