12c12
<       return t('Allows users to insert uploaded files inline. Requires upload.module to work');
---
>       return t('Allows users to insert uploaded files inline. Requires upload.module or attachment.module to work');
80c80
<   if(is_array($node->files) && $op == 'view') {
---
>   if( ( is_array($node->files) || is_array($node->attachments) ) && $op == 'view') {
86a87,90
>          
>          if ( strlen($inline_file[2]) > 0 && strlen($titl) == 0 )
>           $titl = $inline_file[2];
>           
106,111c110,119
<   if (is_numeric($id)) {
<     $n=1;
<     foreach ($node->files as $file) {
<       if ($n == $id) {
<         //return array($file->filename, file_create_url($file->filepath));
<         return array($file->filename, $file->filepath);
---
> 
>   if ( is_array($node->files) ) {
>     if (is_numeric($id)) {
>       $n=1;
>       foreach ($node->files as $file) {
>         if ($n == $id) {
>           //return array($file->filename, file_create_url($file->filepath));
>           return array($file->filename, $file->filepath);
>         }
>         ++$n;
113c121
<       ++$n;
---
>       return NULL;
115,121c123,128
<     return NULL;
<   }
<   else
<   {
<     foreach ($node->files as $file) {
<       if ($file->filename == $id) {
<         return array($file->filename, file_create_url($file->filepath));
---
>     else
>     {
>       foreach ($node->files as $file) {
>         if ($file->filename == $id) {
>           return array($file->filename, file_create_url($file->filepath));
>         }
122a130
>       return NULL;
124d131
<     return NULL;
125a133,154
>   else {
>     if (is_numeric($id)) {
>       $n=1;
>       foreach ($node->attachments as $attachment) {
>         if ($n == $id) {
>           //return array($file->filename, file_create_url($file->filepath));
>           return array($attachment['filename'], module_invoke('filemanager', 'url', $attachment['fid']), $attachment['title']);
>         }
>         ++$n;
>       }
>       return NULL;
>     }
>     else
>     {
>       foreach ($node->attachments as $attachment) {
>         if ($attachment['filename'] == $id) {
>           return array($attachment['filename'], module_invoke('filemanager', 'url', $attachment['fid']), $attachment['title']);
>         }
>       }
>       return NULL;
>     }  
>   }    
