]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
fix for 9302: Would be nice if attachment + number was a link too.
authorcyeh%bluemartini.com <>
Wed, 21 Feb 2001 05:49:59 +0000 (05:49 +0000)
committercyeh%bluemartini.com <>
Wed, 21 Feb 2001 05:49:59 +0000 (05:49 +0000)
patch submitted by afranke@ags.uni-sb.de (Andreas Franke)
thanks for the patch. Now can reference attachments in other bugs as an HTML
link.

globals.pl

index f9e853ab2c48be76b83bc930eb5c88d13a78fc97..13f1994be63209bd08b57d31918b0c7da75124be 100644 (file)
@@ -714,6 +714,14 @@ sub quoteUrls {
         $item = GetBugLink($num, $item);
         $things[$count++] = $item;
     }
+    while ($text =~ s/\battachment(\s|%\#)*(\d+)/"##$count##"/ei) {
+        my $item = $&;
+        my $num = $2;
+        $item = value_quote($item); # Not really necessary, since we know
+                                    # there's no special chars in it.
+        $item = qq{<A HREF="showattachment.cgi?attach_id=$num">$item</A>};
+        $things[$count++] = $item;
+    }
     while ($text =~ s/\*\*\* This bug has been marked as a duplicate of (\d+) \*\*\*/"##$count##"/ei) {
         my $item = $&;
         my $num = $1;