Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
# 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",
};
}
# 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;