Changeset 5143 in subversion
- Timestamp:
- Aug 29, 2011 1:06:29 PM (21 months ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/steps/mail/get.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/mail/get.inc
r4410 r5143 80 80 $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary); 81 81 82 // allow post-processing of the message body 83 $plugin = $RCMAIL->plugins->exec_hook('message_part_get', 84 array('id' => $part->mime_id, 'mimetype' => $mimetype, 'part' => $part, 'download' => !empty($_GET['_download']))); 85 86 if ($plugin['abort']) 87 exit; 88 89 // overwrite modified vars from plugin 90 $mimetype = $plugin['mimetype']; 91 list($ctype_primary, $ctype_secondary) = explode('/', $mimetype); 92 if ($plugin['body']) 93 $part->body = $plugin['body']; 94 82 95 $browser = $RCMAIL->output->browser; 83 96 84 97 // send download headers 85 if ($ _GET['_download']) {98 if ($plugin['download']) { 86 99 header("Content-Type: application/octet-stream"); 87 100 if ($browser->ie) … … 98 111 99 112 // deliver part content 100 if ($ctype_primary == 'text' && $ctype_secondary == 'html' && empty($ _GET['_download'])) {113 if ($ctype_primary == 'text' && $ctype_secondary == 'html' && empty($plugin['download'])) { 101 114 // get part body if not available 102 115 if (!$part->body) … … 120 133 $filename = addcslashes($filename, '"'); 121 134 122 $disposition = !empty($ _GET['_download']) ? 'attachment' : 'inline';135 $disposition = !empty($plugin['download']) ? 'attachment' : 'inline'; 123 136 124 137 header("Content-Disposition: $disposition; filename=\"$filename\"");
Note: See TracChangeset
for help on using the changeset viewer.
