summaryrefslogtreecommitdiffstats
path: root/defparams.pl
diff options
context:
space:
mode:
Diffstat (limited to 'defparams.pl')
-rw-r--r--defparams.pl36
1 files changed, 34 insertions, 2 deletions
diff --git a/defparams.pl b/defparams.pl
index 0ba0189d0..7fc73f51b 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -539,9 +539,41 @@ DefParam("usedependencies",
1);
DefParam("webdotbase",
- "This is the URL prefix that is common to all requests for webdot. The <a href=\"http://www.research.att.com/~north/cgi-bin/webdot.cgi\">webdot package</a> is a very swell thing that generates pictures of graphs. If you have an installation of bugsplat that hides behind a firewall, then to get graphs to work, you will have to install a copy of webdot behind your firewall, and change this path to match. Also, webdot has some trouble with software domain names, so you may have to play games and hack the %urlbase% part of this. If this all seems like too much trouble, you can set this paramater to be the empty string, which will cause the graphing feature to be disabled entirely.",
+ "It is possible to show graphs of dependent bugs. You may set this parameter to
+any of the following:
+<ul>
+<li>A complete file path to \'dot\' (part of <a
+href=\"http://www.graphviz.org\">GraphViz</a>) will generate the graphs
+locally.</li>
+<li>A URL prefix pointing to an installation of the <a
+href=\"http://www.research.att.com/~north/cgi-bin/webdot.cgi\">webdot
+package</a> will generate the graphs remotely.</li>
+<li>A blank value will disable dependency graphing.</li>
+</ul>
+The default value is a publically-accessible webdot server.",
"t",
- "http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%");
+ "http://www.research.att.com/~north/cgi-bin/webdot.cgi/%urlbase%",
+ \&check_webdotbase);
+
+sub check_webdotbase {
+ my ($value) = (@_);
+ $value = trim($value);
+ if ($value eq "") {
+ return "";
+ }
+ if($value !~ /^https?:/) {
+ if(! -x $value) {
+ return "The file path \"$value\" is not a valid executable. Please specify the complete file path to 'dot' if you intend to generate graphs locally.";
+ }
+ # Check .htaccess allows access to generated images
+ open HTACCESS, "data/webdot/.htaccess";
+ if(! grep(/png/,<HTACCESS>)) {
+ print "Dependency graph images are not accessible.\nDelete data/webdot/.htaccess and re-run checksetup.pl to rectify.\n";
+ }
+ close HTACCESS;
+ }
+ return "";
+}
DefParam("entryheaderhtml",
"This is a special header for the bug entry page. The text will be printed after the page header, before the bug entry form. It is meant to be a place to put pointers to intructions on how to enter bugs.",