summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-21 10:12:37 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-21 10:12:37 -0400
commitfbb0df9f5436e956c43ace372f625f08628c000f (patch)
tree354f8095c360cd9f5fcd01e31d798e211c1e07c4 /scripts
parentd20d1a48233851ae77a7bdaf654110136ee39377 (diff)
Disable email attachment posting when $config['attachments']['uploads'] = false
http://laconi.ca/trac/ticket/1721
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maildaemon.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php
index 3f5402bec..a4003b6b2 100755
--- a/scripts/maildaemon.php
+++ b/scripts/maildaemon.php
@@ -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;
+ }
}
}