From d8dad92ff903380dfec153f254ec671fbe91f969 Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Sun, 31 Mar 2002 12:19:06 +0000 Subject: Bug 120537 - Allow the use of a local 'dot' binary to generate dependancy graphs patch by zeroJ@null.net (John Vandenberg), r=gerv, bbaetz --- showdependencygraph.cgi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'showdependencygraph.cgi') diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 4bb90d497..7c59a26db 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -163,13 +163,21 @@ node [URL="${urlbase}show_bug.cgi?id=\\N", style=filled, color=lightgrey] close DOT; chmod 0777, $filename; - my $url = PerformSubsts(Param("webdotbase")) . $filename; - - print qq{
\n}; - + my $webdotbase = Param('webdotbase'); + if($webdotbase =~ /^https?:/) { + my $url = PerformSubsts(Param("webdotbase")) . $filename; + print qq{
\n}; + } else { + my $pngfilename = "data/webdot/$$.png"; + my $mapfilename = "data/webdot/$$.map"; + system("$webdotbase","-Tpng","-o","$pngfilename","$filename"); + system("$webdotbase","-Timap","-o","$mapfilename","$filename"); + print qq{
\n}; + } + # Cleanup any old .dot files created from previous runs. my $since = time() - 24 * 60 * 60; - foreach my $f (glob("data/webdot/*.dot")) { + foreach my $f (glob("data/webdot/*.dot data/webdot/*.png data/webdot/*.map")) { # Here we are deleting all old files. All entries are from the # data/webdot/ directory. Since we're deleting the file (not following # symlinks), this can't escape to delete anything it shouldn't -- cgit v1.2.3-24-g4f1b