From: myk%mozilla.org <> Date: Thu, 8 Nov 2001 10:43:55 +0000 (+0000) Subject: Fix for bug 104652: Duplicate bugs in the dependency tree now get marked with the... X-Git-Tag: bugzilla-2.14.1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e63a96f66bd6326fb5446ae74e6d864fc22a3bf;p=thirdparty%2Fbugzilla.git Fix for bug 104652: Duplicate bugs in the dependency tree now get marked with the message "This bug appears elsewhere in this tree." so users know why the bug does not appear to have dependencies. Patch by Gerv . r=jake@acutex.net,myk@mozilla.org --- diff --git a/showdependencytree.cgi b/showdependencytree.cgi index a6a72eb3f3..b23c3bf8b1 100755 --- a/showdependencytree.cgi +++ b/showdependencytree.cgi @@ -112,8 +112,7 @@ sub DumpKids { my $fgcolor = "#000000"; my $me; if (! defined $depth) { $depth = 1; } - if (exists $seen{$i}) { return; } - $seen{$i} = 1; + if ($target eq "blocked") { $me = "dependson"; } else { @@ -151,7 +150,14 @@ sub DumpKids { $html .= qq| |; } - $short_desc = html_quote($short_desc); + + if (exists $seen{$kid}) { + $short_desc = "<This bug appears elsewhere in this tree>"; + } + else { + $short_desc = html_quote($short_desc); + } + SendSQL("select login_name from profiles where userid = $userid"); my ($owner) = (FetchSQLData()); if ((Param('usetargetmilestone')) && ($milestone)) { @@ -171,7 +177,10 @@ sub DumpKids { # Store the maximum depth so far $realdepth = $realdepth < $depth ? $depth : $realdepth; - DumpKids($kid, $target, $depth + 1); + if (!(exists $seen{$kid})) { + $seen{$kid} = 1; + DumpKids($kid, $target, $depth + 1); + } } if ($list_started) { $html .= ""; } }