alecpl
2009-06-22 ecb9fb058da8d0f5a8e59402c1c1ced21122cbc5
program/steps/mail/attachments.inc
@@ -79,10 +79,11 @@
    $attachment = array(
      'path' => $filepath,
      'name' => $_FILES['_attachments']['name'][$i],
      'mimetype' => rc_mime_content_type($tmpfname, $_FILES['_attachments']['type'][$i])
      'mimetype' => rc_mime_content_type($filepath, $_FILES['_attachments']['type'][$i])
    );
    $attachment = $RCMAIL->plugins->exec_hook('upload_attachment', $attachment);
    if ($attachment['status']) {
      $id = $attachment['id'];
      
@@ -90,11 +91,10 @@
      unset($attachment['status']);
      $_SESSION['compose']['attachments'][$id] = $attachment;
      
      if (is_file($icon = $CONFIG['skin_path'] . '/images/icons/remove-attachment.png')) {
      if (($icon = $_SESSION['compose']['deleteicon']) && is_file($icon)) {
        $button = html::img(array(
          'src' => $icon,
          'alt' => rcube_label('delete'),
          'style' => "padding-right:2px;vertical-align:middle",
          'alt' => rcube_label('delete')
        ));
      }
      else {