From 9bb5d80bb96021d092a3a955a7244c441e9a1e11 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 16 Dec 2006 09:47:12 +0000 Subject: Bug 345405: showdependencygraph.cgi: Dependency Graphs are broken on mod_perl Patch By Max Kanat-Alexander r=LpSolit, a=myk --- showdependencygraph.cgi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'showdependencygraph.cgi') 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; -- cgit v1.2.3-24-g4f1b