From: Michael M Slusarz Date: Tue, 16 Mar 2010 04:36:18 +0000 (-0600) Subject: Fix usage of getAttachments() return. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b51ea2e233b9c019883ff1dc0f4ce4dc507fb5a9;p=horde.git Fix usage of getAttachments() return. --- diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index d11504a95..ad892077e 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -2327,14 +2327,14 @@ class IMP_Compose } foreach ($this->getAttachments() as $att) { - $trailer .= "\n" . $baseurl->copy()->add(array('u' => $auth, 't' => $ts, 'f' => $att->getName())); + $trailer .= "\n" . $baseurl->copy()->add(array('u' => $auth, 't' => $ts, 'f' => $att['part']->getName())); try { - if ($conf['compose']['use_vfs']) { - $vfs->rename(self::VFS_ATTACH_PATH, $att->getInformation('temp_filename'), $fullpath, escapeshellcmd($att->getName())); + if ($att['filetype'] == 'vfs') { + $vfs->rename(self::VFS_ATTACH_PATH, $att['filename'], $fullpath, escapeshellcmd($att['part']->getName())); } else { - $data = file_get_contents($att->getInformation('temp_filename')); - $vfs->writeData($fullpath, escapeshellcmd($att->getName()), $data, true); + $data = file_get_contents($att['filename']); + $vfs->writeData($fullpath, escapeshellcmd($att['part']->getName()), $data, true); } } catch (VFS_Exception $e) { Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_ERR);