projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64916ad
)
fix emailed logos to come from db config, not old files, RT#3093 / RT#4963
author
ivan
<ivan>
Sat, 14 Mar 2009 23:44:38 +0000
(23:44 +0000)
committer
ivan
<ivan>
Sat, 14 Mar 2009 23:44:38 +0000
(23:44 +0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
1f78d72
..
c8384c0
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-660,21
+660,22
@@
sub generate_email {
my $from = $1 || 'example.com';
my $content_id = join('.', rand()*(2**32), $$, time). "\@$from";
my $from = $1 || 'example.com';
my $content_id = join('.', rand()*(2**32), $$, time). "\@$from";
- my $
path = "$FS::UID::conf_dir/conf.$FS::UID::datasrc"
;
- my $
file
;
+ my $
logo
;
+ my $
agentnum = $self->cust_main->agentnum
;
if ( defined($args{'template'}) && length($args{'template'})
if ( defined($args{'template'}) && length($args{'template'})
- &&
-e "$path/logo_". $args{'template'}. ".png"
+ &&
$conf->exists( 'logo_'. $args{'template'}. '.png', $agentnum )
)
{
)
{
- $
file = "$path/logo_". $args{'template'}. ".png"
;
+ $
logo = 'logo_'. $args{'template'}. '.png'
;
} else {
} else {
- $
file = "$path/
logo.png";
+ $
logo = "
logo.png";
}
}
+ my $image_data = $conf->config_binary( $logo, $agentnum);
my $image = build MIME::Entity
'Type' => 'image/png',
'Encoding' => 'base64',
my $image = build MIME::Entity
'Type' => 'image/png',
'Encoding' => 'base64',
- '
Path' => $file
,
+ '
Data' => $image_data
,
'Filename' => 'logo.png',
'Content-ID' => "<$content_id>",
;
'Filename' => 'logo.png',
'Content-ID' => "<$content_id>",
;