]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 99209: Display links on dependency tree page for modifying dependent...
authormyk%mozilla.org <>
Fri, 1 Mar 2002 22:03:55 +0000 (22:03 +0000)
committermyk%mozilla.org <>
Fri, 1 Mar 2002 22:03:55 +0000 (22:03 +0000)
Patch by Myk Melez <myk@mozilla.org>.
r=kiko,bbaetz

showdependencytree.cgi

index 4baa3497690d7e76e440834bd1bb6d7037bec0b7..b193022950bef449c44e2131057d0fbd37705b9b 100755 (executable)
@@ -221,9 +221,17 @@ sub makeTreeHTML {
     $html = "<h3>Bugs that bug $linked_id ".($target eq "blocked" ? 
         "blocks" : "depends on");
 
+    # If there are some bugs in this tree, add a link to view them
+    # as a bug list, and add another link to edit them on the "change
+    # several bugs" page if there is more than one and the user has
+    # "editbugs" privileges.
     if ((scalar keys %printed) > 0) {
-        $html .= ' (<a href="buglist.cgi?bug_id=' . join(',', keys %printed) . 
-                 '">view as bug list</a>)';        
+        my $link = "buglist.cgi?bug_id=" . join(',', keys %printed);
+        $html .= qq~ (<a href="$link">view as bug list</a>~;
+        if (UserInGroup("editbugs") && (scalar keys %printed) > 1) {
+            $html .= qq~ | <a href="$link&tweak=1">change several</a>~;
+        }
+        $html .= ')';
     }
     
     # Provide feedback for omitted bugs