From: jake%acutex.net <> Date: Sat, 6 Oct 2001 05:38:12 +0000 (+0000) Subject: Fix for bug 66651 - Include link to attachment in notification mail X-Git-Tag: bugzilla-2.14.1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d14b47f13ff8c14843b9683b85c113ea95bf1cd;p=thirdparty%2Fbugzilla.git Fix for bug 66651 - Include link to attachment in notification mail Patch by Gavin Shelley r= jake@acutex.net --- diff --git a/processmail b/processmail index 45f5aa3101..ebeb95bf7c 100755 --- a/processmail +++ b/processmail @@ -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