]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 66651 - Include link to attachment in notification mail
authorjake%acutex.net <>
Sat, 6 Oct 2001 05:38:12 +0000 (05:38 +0000)
committerjake%acutex.net <>
Sat, 6 Oct 2001 05:38:12 +0000 (05:38 +0000)
Patch by Gavin Shelley <gavins@iplbath.com>
r= jake@acutex.net

processmail

index 45f5aa31016c52dc1dd2099965cabfc7d3701a4d..ebeb95bf7c8d9e2774b9b62dc7a620549e6e2671 100755 (executable)
@@ -717,6 +717,17 @@ sub NewProcessOnePerson ($$$$$$$$$$$) {
     
     my %substs;
 
+    # If an attachment was created, then add an URL. (Note: the 'g'lobal
+    # replace should work with comments with multiple attachments.)
+
+    if ( $newcomments =~ /Created an attachment \(/ ) {
+
+        my $showattachurlbase =
+            Param('urlbase') . "showattachment.cgi?attach_id=";
+
+        $newcomments =~ s/(Created an attachment \(id=([0-9]+)\))/$1\n --> \(${showattachurlbase}$2\)/g;
+    }
+
     $person .= Param('emailsuffix');
 # 09/13/2000 cyeh@bluemartini.com
 # If a bug is changed, don't put the word "Changed" in the subject mail