From cc36df08d3aef06b72b00831ed82384f7e38461a Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Mon, 1 Jun 2015 14:30:51 -0400 Subject: [PATCH] No need to replace a body part with the exact same body part. No idea why this was done. Traced back to commit 0d2544c. Started polling the IMAP server for both the original part and the bodypart. Previous commit was 6c6db9e, when support for modifying objects was first introduced (even then, hard to say if this was ultimately happening since the actions are so spread out among different, deep, class structures. Anyway, this seems to work, and fixes an issue that was causing the data to be decoded into some kind of binary data instead of the XML data is really is. --- .../Kolab_Storage/lib/Horde/Kolab/Storage/Object.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Object.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Object.php index 7992fea3ce4..ea00990309d 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Object.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Object.php @@ -429,16 +429,7 @@ public function save(Horde_Kolab_Storage_Object_Writer $data) ); } - // Replace Kolab part. - $original = $body->getPart($mime_id); - $original->setContents( - $this->_getDriver()->fetchBodypart( - $this->_getFolder(), - $this->getBackendId(), - $mime_id - ) - ); - $this->_content = $original->getContents(array('stream' => true)); + $this->_content = $body->getPart($mime_id)->getContents(array('stream' => true)); $body->alterPart($mime_id, $this->createFreshKolabPart($data->save($this))); $body->buildMimeIds();