projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT 4.0.13
[freeside.git]
/
rt
/
lib
/
RT
/
Template.pm
diff --git
a/rt/lib/RT/Template.pm
b/rt/lib/RT/Template.pm
index
117cc3f
..
fd4b511
100755
(executable)
--- a/
rt/lib/RT/Template.pm
+++ b/
rt/lib/RT/Template.pm
@@
-2,7
+2,7
@@
#
# COPYRIGHT:
#
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-201
2
Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-201
3
Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@
-335,7
+335,7
@@
sub Parse {
my ($rv, $msg);
my ($rv, $msg);
- if ($self->Content =~ m{^Content-Type:\s+text/html\b}im) {
+ if (
not $self->IsEmpty and
$self->Content =~ m{^Content-Type:\s+text/html\b}im) {
local $RT::Transaction::PreferredContentType = 'text/html';
($rv, $msg) = $self->_Parse(@_);
}
local $RT::Transaction::PreferredContentType = 'text/html';
($rv, $msg) = $self->_Parse(@_);
}
@@
-390,6
+390,7
@@
sub _Parse {
# Unfold all headers
$self->{'MIMEObj'}->head->unfold;
# Unfold all headers
$self->{'MIMEObj'}->head->unfold;
+ $self->{'MIMEObj'}->head->modify(1);
return ( 1, $self->loc("Template parsed") );
return ( 1, $self->loc("Template parsed") );
@@
-457,7
+458,7
@@
sub _ParseContentPerl {
foreach my $key ( keys %{ $args{TemplateArgs} } ) {
my $val = $args{TemplateArgs}{ $key };
next unless ref $val;
foreach my $key ( keys %{ $args{TemplateArgs} } ) {
my $val = $args{TemplateArgs}{ $key };
next unless ref $val;
- next if ref
$val
=~ /^(ARRAY|HASH|SCALAR|CODE)$/;
+ next if ref
($val)
=~ /^(ARRAY|HASH|SCALAR|CODE)$/;
$args{TemplateArgs}{ $key } = \$val;
}
$args{TemplateArgs}{ $key } = \$val;
}