/[drupal]/contributions/modules/attachment/attachment.module
ViewVC logotype

Diff of /contributions/modules/attachment/attachment.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.20, Thu Aug 2 17:38:57 2007 UTC revision 1.21, Fri Nov 30 23:07:00 2007 UTC
# Line 1  Line 1 
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    
# Line 353  function attachment_add(&$node) { Line 353  function attachment_add(&$node) {
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      }      }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.2