| 1 |
<?php |
<?php |
| 2 |
// $Id: attachment.module,v 1.15.2.1 2006/09/27 17:49:41 robertDouglass Exp $ |
// $Id: attachment.module,v 1.15.2.2 2006/09/28 09:53:13 robertDouglass Exp $ |
| 3 |
|
|
| 4 |
define(ATTACHMENT_EXTENSION_WHITELIST, variable_get('attachment_text_rename_whitelist', 'jpg jpeg gif png tiff txt html doc xls pdf ppt pps odt mp3 ogg wav wmv mpg')); |
define(ATTACHMENT_EXTENSION_WHITELIST, variable_get('attachment_text_rename_whitelist', 'jpg jpeg gif png tiff txt html doc xls pdf ppt pps odt mp3 ogg wav wmv mpg')); |
| 5 |
|
|
| 305 |
// existing attachment from the array. |
// existing attachment from the array. |
| 306 |
foreach ((array)$node->attachments as $key => $attachment) { |
foreach ((array)$node->attachments as $key => $attachment) { |
| 307 |
if ($attachment['filename'] == $new_attachment['filename']) { |
if ($attachment['filename'] == $new_attachment['filename']) { |
| 308 |
|
$new_attachment['aid'] = $attachment['aid']; |
| 309 |
$new_attachment['fid'] = $attachment['fid']; |
$new_attachment['fid'] = $attachment['fid']; |
| 310 |
$remove_key = $key; |
$remove_key = $key; |
| 311 |
} |
} |