]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 104652: Duplicate bugs in the dependency tree now get marked with the...
authormyk%mozilla.org <>
Thu, 8 Nov 2001 10:43:55 +0000 (10:43 +0000)
committermyk%mozilla.org <>
Thu, 8 Nov 2001 10:43:55 +0000 (10:43 +0000)
Patch by Gerv <gerv@mozilla.org>.
r=jake@acutex.net,myk@mozilla.org

showdependencytree.cgi

index a6a72eb3f30378822684a0f738966636268f8aa7..b23c3bf8b1d71004bab66b12fece10d4cb1b14af 100755 (executable)
@@ -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|<strike><span style="color: $fgcolor; background-color: $bgcolor;">
                     |;
                 }
-                $short_desc = html_quote($short_desc);
+
+                if (exists $seen{$kid}) {     
+                    $short_desc = "&lt;<em>This bug appears elsewhere in this tree</em>&gt;";
+                }
+                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 .= "</ul>"; }
     }