Commit 9bb5d80b authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 345405: showdependencygraph.cgi: Dependency Graphs are broken on mod_perl

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
parent 28468d54
...@@ -433,7 +433,7 @@ sub bz_locations { ...@@ -433,7 +433,7 @@ sub bz_locations {
# change showdependencygraph.cgi to set image_url to the correct # change showdependencygraph.cgi to set image_url to the correct
# location. # location.
# The script should really generate these graphs directly... # The script should really generate these graphs directly...
'webdotdir' => "$datadir/webdot", 'webdotdir' => "$libpath/$datadir/webdot",
'extensionsdir' => "$libpath/extensions", 'extensionsdir' => "$libpath/extensions",
}; };
} }
......
...@@ -247,6 +247,11 @@ if ($webdotbase =~ /^https?:/) { ...@@ -247,6 +247,11 @@ if ($webdotbase =~ /^https?:/) {
# On Windows $pngfilename will contain \ instead of / # On Windows $pngfilename will contain \ instead of /
$pngfilename =~ s|\\|/|g if $^O eq 'MSWin32'; $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; $vars->{'image_url'} = $pngfilename;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment