summaryrefslogtreecommitdiffstats
path: root/showdependencygraph.cgi
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-03-27 06:00:11 +0100
committerjocuri%softhome.net <>2004-03-27 06:00:11 +0100
commitc0fc50d35b1e3320b28b281c16489f78babc5abb (patch)
tree588957a4a2130089f67533b55ab3a7b7c6c53106 /showdependencygraph.cgi
parentcecc6432218b8a3ca3dd07e6792de99e88be4683 (diff)
downloadbugzilla-c0fc50d35b1e3320b28b281c16489f78babc5abb.tar.gz
bugzilla-c0fc50d35b1e3320b28b281c16489f78babc5abb.tar.xz
Patch for bug 237369: implement relatively simple changes from %FORM to $cgi->param variable; patch by Teemu Mannermaa <wicked@etlicon.fi>; r=kiko, justdave; a=justdave.
Diffstat (limited to 'showdependencygraph.cgi')
-rwxr-xr-xshowdependencygraph.cgi26
1 files changed, 13 insertions, 13 deletions
diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi
index 6496bbc8e..a863df142 100755
--- a/showdependencygraph.cgi
+++ b/showdependencygraph.cgi
@@ -100,11 +100,11 @@ sub AddLink {
}
}
-$::FORM{'rankdir'} = "LR" if !defined $::FORM{'rankdir'};
+my $rankdir = $cgi->param('rankdir') || "LR";
-if (!defined($::FORM{'id'}) && !defined($::FORM{'doall'})) {
+if (!defined $cgi->param('id') && !defined $cgi->param('doall')) {
ThrowCodeError("missing_bug_id");
-}
+}
my ($fh, $filename) = File::Temp::tempfile("XXXXXXXXXX",
SUFFIX => '.dot',
@@ -113,13 +113,13 @@ my $urlbase = Param('urlbase');
print $fh "digraph G {";
print $fh qq{
-graph [URL="${urlbase}query.cgi", rankdir=$::FORM{'rankdir'}, size="64,64"]
+graph [URL="${urlbase}query.cgi", rankdir=$rankdir, size="64,64"]
node [URL="${urlbase}show_bug.cgi?id=\\N", style=filled, color=lightgrey]
};
my %baselist;
-if ($::FORM{'doall'}) {
+if ($cgi->param('doall')) {
SendSQL("SELECT blocked, dependson FROM dependencies");
while (MoreSQLData()) {
@@ -127,7 +127,7 @@ if ($::FORM{'doall'}) {
AddLink($blocked, $dependson, $fh);
}
} else {
- foreach my $i (split('[\s,]+', $::FORM{'id'})) {
+ foreach my $i (split('[\s,]+', $cgi->param('id'))) {
$i = trim($i);
ValidateBugID($i);
$baselist{$i} = 1;
@@ -179,7 +179,7 @@ foreach my $k (keys(%seen)) {
my @params;
- if ($summary ne "" && $::FORM{'showsummary'}) {
+ if ($summary ne "" && $cgi->param('showsummary')) {
$summary =~ s/([\\\"])/\\$1/g;
push(@params, qq{label="$k\\n$summary"});
}
@@ -205,7 +205,7 @@ foreach my $k (keys(%seen)) {
# Show the bug summary in tooltips only if not shown on
# the graph and it is non-empty (the user can see the bug)
- if (!$::FORM{'showsummary'} && $summary ne "") {
+ if (!$cgi->param('showsummary') && $summary ne "") {
$bugtitles{$k} .= " - $summary";
}
}
@@ -271,11 +271,11 @@ foreach my $f (@files)
}
}
-$vars->{'bug_id'} = $::FORM{'id'};
-$vars->{'multiple_bugs'} = ($::FORM{'id'} =~ /[ ,]/);
-$vars->{'doall'} = $::FORM{'doall'};
-$vars->{'rankdir'} = $::FORM{'rankdir'};
-$vars->{'showsummary'} = $::FORM{'showsummary'};
+$vars->{'bug_id'} = $cgi->param('id');
+$vars->{'multiple_bugs'} = ($cgi->param('id') =~ /[ ,]/);
+$vars->{'doall'} = $cgi->param('doall');
+$vars->{'rankdir'} = $rankdir;
+$vars->{'showsummary'} = $cgi->param('showsummary');
# Generate and return the UI (HTML page) from the appropriate template.
print $cgi->header();