--- upload.module.cvs 2006-08-08 19:57:22.000000000 +0200 +++ upload.module 2006-08-08 20:03:20.000000000 +0200 @@ -505,10 +505,9 @@ $node->teaser = str_replace($old, $new, $node->teaser); } } - // Add the attachments list to node body if (count($node->files) && !$teaser) { - $node->body .= theme('upload_attachments', $node->files); + $node->body .= theme('upload_attachments', $node->files, $node); } } break; @@ -561,7 +560,14 @@ /** * Displays file attachments in table */ -function theme_upload_attachments($files) { +function theme_upload_attachments($files, $node = NULL) { + if ($node->type) { + $function = 'theme_'.$node->type.'_upload_attachments'; + if (function_exists($function)) { + return call_user_func($function, $files, $node); + } + } + $header = array(t('Attachment'), t('Size')); $rows = array(); foreach ($files as $file) {