summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Constants.pm2
-rwxr-xr-xshowdependencygraph.cgi5
2 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 9e37f9f5c..67e0a9225 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -433,7 +433,7 @@ sub bz_locations {
# change showdependencygraph.cgi to set image_url to the correct
# location.
# The script should really generate these graphs directly...
- 'webdotdir' => "$datadir/webdot",
+ 'webdotdir' => "$libpath/$datadir/webdot",
'extensionsdir' => "$libpath/extensions",
};
}
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;