| 1 |
<?php |
<?php |
| 2 |
// $Id: attachment.module,v 1.18 2007/07/17 19:50:04 cscsteve Exp $ |
// $Id: attachment.module,v 1.20 2007/08/02 17:38:57 cscsteve 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 |
|
|
| 353 |
// existing attachment from the array. |
// existing attachment from the array. |
| 354 |
foreach ((array)$node->attachments as $key => $attachment) { |
foreach ((array)$node->attachments as $key => $attachment) { |
| 355 |
if ($attachment['filename'] == $new_attachment['filename']) { |
if ($attachment['filename'] == $new_attachment['filename']) { |
| 356 |
|
$new_attachment['aid'] = $attachment['aid']; |
| 357 |
$new_attachment['fid'] = $attachment['fid']; |
$new_attachment['fid'] = $attachment['fid']; |
| 358 |
$remove_key = $key; |
$remove_key = $key; |
| 359 |
} |
} |