From b51ea2e233b9c019883ff1dc0f4ce4dc507fb5a9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 15 Mar 2010 22:36:18 -0600 Subject: [PATCH] Fix usage of getAttachments() return. --- imp/lib/Compose.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.11.0