You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/05/24 19:26:45 UTC
svn commit: r409211 -
/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Author: felicity
Date: Wed May 24 10:26:45 2006
New Revision: 409211
URL: http://svn.apache.org/viewvc?rev=409211&view=rev
Log:
bug 4861: fix up the _replace_tags() code with the code from 3.1
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=409211&r1=409210&r2=409211&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Wed May 24 10:26:45 2006
@@ -1021,10 +1021,11 @@
# a tag for it (bug 4793)
my $t;
my $v;
- $text =~ s{_(\w+?)(?:\((.*?)\))?_}{
- $t = $1;
- $v = $self->_get_tag($t,$2);
- (defined $v) ? $v : "_".$t."_"
+ $text =~ s{(_(\w+?)(?:\((.*?)\))?_)}{
+ my $full = $1;
+ my $tag = $2;
+ my $result = $self->_get_tag($tag,$3);
+ (defined $result) ? $result : $full;
}ge;
return $text;
@@ -1100,6 +1101,8 @@
See C<Mail::SpamAssassin::Conf>'s C<TEMPLATE TAGS> section for more details on
how template tags are used.
+
+C<undef> will be returned if a tag by that name has not been defined.
=cut