]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 252370: Provide edit link for attachment in comment. Adds an
authorkiko%async.com.br <>
Sat, 24 Jul 2004 07:20:43 +0000 (07:20 +0000)
committerkiko%async.com.br <>
Sat, 24 Jul 2004 07:20:43 +0000 (07:20 +0000)
[edit] link next to attachments in comment text, and removes the
&action=view suffix which breaks things when pasting into a shell.
r=bugreport, myk; a=myk.

globals.pl

index 6632833abd2abbc6a5d564d8d2f8cc61da31415d..e31c8e717983aae8339e587211ac48f50b3c0f1b 100644 (file)
@@ -968,10 +968,10 @@ sub GetAttachmentLink {
     # Now that we know we've got all the information we're gonna get, let's
     # return the link (which is the whole reason we were called :)
     my ($title, $className) = @{$::attachlink{$attachid}};
-    # $title will be undefined if the bug didn't exist in the database.
+    # $title will be undefined if the attachment didn't exist in the database.
     if (defined $title) {
-        my $linkval = "attachment.cgi?id=$attachid&amp;action=view";
-        return qq{<a href="$linkval" class="$className" title="$title">$link_text</a>};
+        my $linkval = "attachment.cgi?id=$attachid";
+        return qq{<a href="$linkval" class="$className" title="$title">$link_text</a> [<a href="$linkval&amp;action=edit">edit</a>]};
     }
     else {
         return qq{$link_text};