Disable email attachment posting when $config['attachments']['uploads'] = false

http://laconi.ca/trac/ticket/1721
This commit is contained in:
Craig Andrews 2009-07-21 10:12:37 -04:00
parent d20d1a4823
commit fbb0df9f54
1 changed files with 6 additions and 3 deletions

View File

@ -318,9 +318,12 @@ class MailerDaemon
&& $parsed->ctype_secondary=='plain') {
$msg = $parsed->body;
}else if(!empty($parsed->body)){
$attachment = tmpfile();
fwrite($attachment, $parsed->body);
$attachments[] = $attachment;
if(common_config('attachments', 'uploads')){
//only save attachments if uploads are enabled
$attachment = tmpfile();
fwrite($attachment, $parsed->body);
$attachments[] = $attachment;
}
}
}